Skip to content

Commit

Permalink
remove zap, use slog instead (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 authored Jan 15, 2024
1 parent 0342fec commit 2ceb762
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 133 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go 1.21
uses: actions/setup-go@v5
with:
go-version: '1.21.x'

- name: Lint
uses: golangci/golangci-lint-action@v3
with:
args: -p bugs -p unused

- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.21.x'

- name: Test
run: |
make
27 changes: 12 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
module github.com/metal-stack/go-hal

go 1.20
go 1.21

require (
github.com/avast/retry-go/v4 v4.3.2
github.com/creack/pty v1.1.18
github.com/gliderlabs/ssh v0.3.5
github.com/google/uuid v1.3.0
github.com/avast/retry-go/v4 v4.5.1
github.com/creack/pty v1.1.21
github.com/gliderlabs/ssh v0.3.6
github.com/google/uuid v1.5.0
github.com/sethvargo/go-password v0.2.0
github.com/stmcginnis/gofish v0.13.0
github.com/stretchr/testify v1.8.1
github.com/stmcginnis/gofish v0.15.0
github.com/stretchr/testify v1.8.4
github.com/vmware/goipmi v0.0.0-20181114221114-2333cd82d702
go.uber.org/zap v1.24.0
golang.org/x/net v0.5.0
golang.org/x/net v0.20.0
)

require (
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
78 changes: 25 additions & 53 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,73 +1,45 @@
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/avast/retry-go/v4 v4.3.2 h1:x4sTEu3jSwr7zNjya8NTdIN+U88u/jtO/q3OupBoDtM=
github.com/avast/retry-go/v4 v4.3.2/go.mod h1:rg6XFaiuFYII0Xu3RDbZQkxCofFwruZKW8oEF1jpWiU=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/avast/retry-go/v4 v4.5.1 h1:AxIx0HGi4VZ3I02jr78j5lZ3M6x1E0Ivxa6b0pUUh7o=
github.com/avast/retry-go/v4 v4.5.1/go.mod h1:/sipNsvNB3RRuT5iNcb6h73nw3IBmXJ/H3XrCQYSOpc=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0=
github.com/creack/pty v1.1.21/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gliderlabs/ssh v0.3.6 h1:ZzjlDa05TcFRICb3anf/dSPN3ewz1Zx6CMLPWgkm3b8=
github.com/gliderlabs/ssh v0.3.6/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8=
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sethvargo/go-password v0.2.0 h1:BTDl4CC/gjf/axHMaDQtw507ogrXLci6XRiLc7i/UHI=
github.com/sethvargo/go-password v0.2.0/go.mod h1:Ym4Mr9JXLBycr02MFuVQ/0JHidNetSgbzutTr3zsYXE=
github.com/stmcginnis/gofish v0.13.0 h1:qq6q3yNt9vw7ZuJxiw87hq9+BdPLsuRQBwl+XoZSz60=
github.com/stmcginnis/gofish v0.13.0/go.mod h1:BLDSFTp8pDlf/xDbLZa+F7f7eW0E/CHCboggsu8CznI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stmcginnis/gofish v0.15.0 h1:8TG41+lvJk/0Nf8CIIYErxbMlQUy80W0JFRZP3Ld82A=
github.com/stmcginnis/gofish v0.15.0/go.mod h1:BLDSFTp8pDlf/xDbLZa+F7f7eW0E/CHCboggsu8CznI=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/vmware/goipmi v0.0.0-20181114221114-2333cd82d702 h1:yx587LNBbOpIxzCBHBiI94Wx8ryIAFlu1w0lDwm64cA=
github.com/vmware/goipmi v0.0.0-20181114221114-2333cd82d702/go.mod h1:YiWonbS/PuCtti3wt9jl+FvNEJ7c0nvmjGoEYxdjyk0=
go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ=
go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
11 changes: 6 additions & 5 deletions internal/bios/bios_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestBios(t *testing.T) {

bios, err := Bios()
assert.NoError(t, err)
require.NoError(t, err)
assert.NotNil(t, bios)
assert.NotEqual(t, bios.Version, "")
assert.NotEqual(t, bios.Vendor, "")
assert.NotEqual(t, bios.Date, "")
assert.NotEqual(t, bios.String(), "")
assert.NotEqual(t, "", bios.Version)
assert.NotEqual(t, "", bios.Vendor)
assert.NotEqual(t, "", bios.Date)
assert.NotEqual(t, "", bios.String())
assert.True(t, strings.HasPrefix(bios.String(), "version"))
}
12 changes: 6 additions & 6 deletions internal/vendors/supermicro/sum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package supermicro
import (
"testing"

"github.com/metal-stack/go-hal/pkg/logger"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"
)

func TestParseUUIDLine(t *testing.T) {
Expand All @@ -18,7 +18,7 @@ func TestParseUUIDLine(t *testing.T) {

func TestUnmarshalS2BiosCfg(t *testing.T) {
// given
s, _ := newSum("/bin/true", "X11SDV-8C-TP8F", zaptest.NewLogger(t).Sugar())
s, _ := newSum("/bin/true", "X11SDV-8C-TP8F", logger.New())
s.biosCfgXML = testS2BiosCfg

// when
Expand All @@ -28,13 +28,13 @@ func TestUnmarshalS2BiosCfg(t *testing.T) {
require.Equal(t, X11SDV_8C_TP8F, s.boardModel)

// then
require.Nil(t, err)
require.NoError(t, err)

// when
err = s.findUEFINetworkBootOption()

// then
require.Nil(t, err)
require.NoError(t, err)
require.Equal(t, "UEFI Network:UEFI: PXE IPv4 Intel(R) I350 Gigabit Network Connection", s.uefiNetworkBootOption)
}

Expand All @@ -56,13 +56,13 @@ func TestUnmarshalBigTwinBiosCfg(t *testing.T) {
require.True(t, s.secureBootEnabled)

// then
require.Nil(t, err)
require.NoError(t, err)

// when
err = s.findUEFINetworkBootOption()

// then
require.Nil(t, err)
require.NoError(t, err)
require.Equal(t, "UEFI Network:UEFI: PXE IP4 Intel(R) Ethernet Controller XXV710 for 25GbE SFP28", s.uefiNetworkBootOption)
}

Expand Down
7 changes: 4 additions & 3 deletions internal/vendors/supermicro/supermicro_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package supermicro

import (
"testing"

"github.com/google/uuid"
"github.com/metal-stack/go-hal"
uuidendian "github.com/metal-stack/go-hal/internal/uuid-endianness"
"github.com/stretchr/testify/require"
"testing"
)

func Test_UUID(t *testing.T) {
Expand All @@ -15,15 +16,15 @@ func Test_UUID(t *testing.T) {
uid, err := uuidendian.FromString(u)

// then
require.Nil(t, err)
require.NoError(t, err)
require.NotNil(t, uid)
require.Equal(t, "f6157800-70e3-11e9-8000-efbeaddeefbe", uid.String())

// when
id, err := UUID(u)

// then
require.Nil(t, err)
require.NoError(t, err)
require.NotNil(t, id)
require.Equal(t, "007815f6-e370-e911-8000-efbeaddeefbe", id.String())
}
Expand Down
17 changes: 10 additions & 7 deletions pkg/logger/logger.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package logger

import (
"github.com/metal-stack/go-hal/pkg/logger/zap"
uberzap "go.uber.org/zap"
"log/slog"
"os"

halslog "github.com/metal-stack/go-hal/pkg/logger/slog"
)

// A global variable so that log functions can be directly accessed
Expand All @@ -20,13 +22,14 @@ type Logger interface {

// New returns an simple instance of logger
func New() Logger {
l, _ := uberzap.NewProduction()
return l.Sugar()
jsonHandler := slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{})
log := slog.New(jsonHandler)
return halslog.New(log)
}

// NewZap returns an zap instance of logger
func NewZap(logger *uberzap.SugaredLogger) Logger {
return zap.New(logger)
// NewSlog returns an zap instance of logger
func NewSlog(logger *slog.Logger) Logger {
return halslog.New(logger)
}

func Debugw(format string, args ...any) {
Expand Down
42 changes: 42 additions & 0 deletions pkg/logger/slog/slog.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package slog

import (
"fmt"
"log/slog"
)

type SlogLogger struct {
log *slog.Logger
}

func New(logger *slog.Logger) *SlogLogger {
return &SlogLogger{
log: logger,
}
}

func (l *SlogLogger) Debugw(format string, args ...any) {
l.log.Debug(format, args...)
}

func (l *SlogLogger) Infow(format string, args ...any) {
l.log.Info(format, args...)
}

func (l *SlogLogger) Warnw(format string, args ...any) {
l.log.Warn(format, args...)
}

func (l *SlogLogger) Errorw(format string, args ...any) {
l.log.Error(format, args...)
}

func (l *SlogLogger) Fatalw(format string, args ...any) {
l.log.Error(format, args...)
panic(fmt.Errorf(format, args...))
}

func (l *SlogLogger) Panicw(format string, args ...any) {
l.log.Error(format, args...)
panic(fmt.Errorf(format, args...))
}
39 changes: 0 additions & 39 deletions pkg/logger/zap/zap.go

This file was deleted.

0 comments on commit 2ceb762

Please sign in to comment.