Skip to content

Commit

Permalink
migrate deferlog to the separate package
Browse files Browse the repository at this point in the history
  • Loading branch information
wweir committed Aug 9, 2021
1 parent adca660 commit 65234b1
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 274 deletions.
2 changes: 1 addition & 1 deletion cmd/sowerd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/cristalhq/aconfig"
"github.com/rs/zerolog/log"
"github.com/wweir/sower/pkg/deferlog"
"github.com/wweir/deferlog"
"github.com/wweir/sower/pkg/teeconn"
"github.com/wweir/sower/transport/sower"
"github.com/wweir/sower/transport/trojan"
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ require (
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.23.0
github.com/ulule/deepcopier v0.0.0-20200430083143-45decc6639b6
github.com/wweir/deferlog v0.0.1
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/ulule/deepcopier v0.0.0-20200430083143-45decc6639b6 h1:TtyC78WMafNW8QFfv3TeP3yWNDG+uxNkk9vOrnDu6JA=
github.com/ulule/deepcopier v0.0.0-20200430083143-45decc6639b6/go.mod h1:h8272+G2omSmi30fBXiZDMkmHuOgonplfKIKjQWzlfs=
github.com/wweir/deferlog v0.0.1 h1:KKWFRsS46KTqkAR4F79VtZ4h7Q6PvnbrPkBdUxEUujc=
github.com/wweir/deferlog v0.0.1/go.mod h1:mIpuA0PTdQ28oas0iR1uZYlFiDyOxMOXQgmx6gNOg3I=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
Expand Down
131 changes: 0 additions & 131 deletions pkg/deferlog/deferlog.go

This file was deleted.

88 changes: 0 additions & 88 deletions pkg/deferlog/enhance.go

This file was deleted.

51 changes: 0 additions & 51 deletions pkg/deferlog/init.go

This file was deleted.

2 changes: 1 addition & 1 deletion router/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"github.com/miekg/dns"
"github.com/wweir/sower/pkg/deferlog"
"github.com/wweir/deferlog"
)

func (r *Router) ServeDNS(w dns.ResponseWriter, req *dns.Msg) {
Expand Down
2 changes: 1 addition & 1 deletion router/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"time"

"github.com/wweir/sower/pkg/deferlog"
"github.com/wweir/deferlog"
)

var pingClient = http.Client{
Expand Down
2 changes: 1 addition & 1 deletion router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
geoip2 "github.com/oschwald/geoip2-golang"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"github.com/wweir/sower/pkg/deferlog"
"github.com/wweir/deferlog"
"github.com/wweir/sower/pkg/dhcp"
"github.com/wweir/sower/pkg/mem"
"github.com/wweir/sower/util"
Expand Down

0 comments on commit 65234b1

Please sign in to comment.