diff --git a/cmd/1pl/main.go b/cmd/1pl/main.go index 2b1e5ed0..5f74cb88 100644 --- a/cmd/1pl/main.go +++ b/cmd/1pl/main.go @@ -4,6 +4,7 @@ import ( "bufio" "context" "errors" + "flag" "fmt" "io" "io/ioutil" @@ -12,7 +13,6 @@ import ( "os/signal" "strings" - "github.com/spf13/pflag" "golang.org/x/crypto/ssh/terminal" "github.com/ichiban/prolog" @@ -25,8 +25,8 @@ var Version = "1pl/0.1" func main() { var verbose bool - pflag.BoolVarP(&verbose, "verbose", "v", false, `verbose`) - pflag.Parse() + flag.BoolVar(&verbose, "v", false, `verbose`) + flag.Parse() oldState, err := terminal.MakeRaw(0) if err != nil { @@ -99,7 +99,7 @@ func main() { return k(env) }) - for _, a := range pflag.Args() { + for _, a := range flag.Args() { b, err := ioutil.ReadFile(a) if err != nil { log.Panicf("failed to read %s: %v", a, err) diff --git a/go.mod b/go.mod index a81ce553..cbd42b79 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.16 require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/kr/pretty v0.1.0 // indirect - github.com/spf13/pflag v1.0.5 github.com/stretchr/objx v0.1.1 // indirect github.com/stretchr/testify v1.7.0 golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 diff --git a/go.sum b/go.sum index 5ee2d29f..477e0a5b 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,6 @@ 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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=