Skip to content

Commit

Permalink
remove signal-context dep
Browse files Browse the repository at this point in the history
  • Loading branch information
WanzenBug committed Jan 2, 2023
1 parent 332e5cb commit e8cc08a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions cmd/signals.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ package cmd

import (
"context"
"os/signal"
"syscall"

"github.com/sethvargo/go-signalcontext"
)

func onInterruptWrap(ctx context.Context) (context.Context, context.CancelFunc) {
return signalcontext.Wrap(ctx, syscall.SIGINT, syscall.SIGTERM)
return signal.NotifyContext(ctx, syscall.SIGINT, syscall.SIGTERM)
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/rck/unit v0.0.3
github.com/rodaine/table v1.1.0
github.com/sethvargo/go-signalcontext v0.2.1
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.14.0
Expand Down Expand Up @@ -60,6 +59,7 @@ require (
github.com/go-stack/stack v1.8.0 // indirect
github.com/go-swagger/go-swagger v0.26.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
Expand Down
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,6 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
Expand Down Expand Up @@ -939,8 +938,6 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sethvargo/go-signalcontext v0.2.1 h1:HyuzDJGjAuWXIsJOmw8E3fJBj9IswvoWfM8N+pQLtuM=
github.com/sethvargo/go-signalcontext v0.2.1/go.mod h1:re4Zg/SUpf7+wgTM/EeSDR/rV79uX+fJ26FpM8Wl7Qk=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
Expand Down

0 comments on commit e8cc08a

Please sign in to comment.