Skip to content

Commit

Permalink
Migrate to golang.org/x/term
Browse files Browse the repository at this point in the history
  • Loading branch information
johejo committed Apr 8, 2021
1 parent 670cd6b commit b88970b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
4 changes: 2 additions & 2 deletions cmd/mysqldef/mysqldef.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/k0kubun/sqldef/adapter"
"github.com/k0kubun/sqldef/adapter/mysql"
"github.com/k0kubun/sqldef/schema"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/term"
)

var version string
Expand Down Expand Up @@ -76,7 +76,7 @@ func parseOptions(args []string) (adapter.Config, *sqldef.Options) {

if opts.Prompt {
fmt.Printf("Enter Password: ")
pass, err := terminal.ReadPassword(int(syscall.Stdin))
pass, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
log.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/psqldef/psqldef.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/k0kubun/sqldef/adapter"
"github.com/k0kubun/sqldef/adapter/postgres"
"github.com/k0kubun/sqldef/schema"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/term"
)

var version string
Expand Down Expand Up @@ -75,7 +75,7 @@ func parseOptions(args []string) (adapter.Config, *sqldef.Options) {

if opts.Prompt {
fmt.Printf("Enter Password: ")
pass, err := terminal.ReadPassword(int(syscall.Stdin))
pass, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
log.Fatal(err)
}
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ require (
github.com/jessevdk/go-flags v1.4.0
github.com/lib/pq v1.10.0
github.com/mattn/go-sqlite3 v1.14.6
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f // indirect
golang.org/x/term v0.0.0-20210406210042-72f3dc4e9b72
)
13 changes: 4 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ github.com/lib/pq v1.10.0 h1:Zx5DJFEYQXio93kgXnQ09fXNiUKsqv4OUEu2UtGcB1E=
github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg=
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20210406210042-72f3dc4e9b72 h1:VqE9gduFZ4dbR7XoL77lHFp0/DyDUBKSXK7CMFkVcV0=
golang.org/x/term v0.0.0-20210406210042-72f3dc4e9b72/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=

0 comments on commit b88970b

Please sign in to comment.