# HG changeset patch # User Guido Berhoerster # Date 1607802275 -3600 # Node ID 29769b9e2f098b077806ca65d7db5dacaa936ebe # Parent 44c07eb8ef08ed216197d6fa2d4e55684b832626 Switch to golang.org/x/term module Switch from golang.org/x/crypto/ssh/terminal to the new golang.org/x/term module. diff -r 44c07eb8ef08 -r 29769b9e2f09 cmd/sievemgr/common.go --- a/cmd/sievemgr/common.go Thu Dec 03 13:52:28 2020 +0100 +++ b/cmd/sievemgr/common.go Sat Dec 12 20:44:35 2020 +0100 @@ -34,7 +34,7 @@ "go.guido-berhoerster.org/managesieve" "go.guido-berhoerster.org/sievemgr/cmd/sievemgr/internal/config" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" ) var errTooBig = errors.New("too big") @@ -77,7 +77,7 @@ } io.WriteString(w, "Password: ") - rawPassword, err := terminal.ReadPassword(fd) + rawPassword, err := term.ReadPassword(fd) io.WriteString(w, "\n") if err != nil { return fmt.Errorf("failed to read password: %s", err) diff -r 44c07eb8ef08 -r 29769b9e2f09 cmd/sievemgr/edit.go --- a/cmd/sievemgr/edit.go Thu Dec 03 13:52:28 2020 +0100 +++ b/cmd/sievemgr/edit.go Sat Dec 12 20:44:35 2020 +0100 @@ -33,7 +33,7 @@ "go.guido-berhoerster.org/managesieve" "go.guido-berhoerster.org/sievemgr/cmd/sievemgr/internal/config" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" ) func init() { @@ -119,8 +119,8 @@ scriptName := args[0] - if !terminal.IsTerminal(int(os.Stdin.Fd())) || - !terminal.IsTerminal(int(os.Stdout.Fd())) { + if !term.IsTerminal(int(os.Stdin.Fd())) || + !term.IsTerminal(int(os.Stdout.Fd())) { return fmt.Errorf("the edit subcommand can only be used interactively\n") } diff -r 44c07eb8ef08 -r 29769b9e2f09 go.mod --- a/go.mod Thu Dec 03 13:52:28 2020 +0100 +++ b/go.mod Sat Dec 12 20:44:35 2020 +0100 @@ -4,5 +4,5 @@ require ( go.guido-berhoerster.org/managesieve v0.0.0-20201027164714-f9bb517e9447 - golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 + golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf ) diff -r 44c07eb8ef08 -r 29769b9e2f09 go.sum --- a/go.sum Thu Dec 03 13:52:28 2020 +0100 +++ b/go.sum Sat Dec 12 20:44:35 2020 +0100 @@ -1,16 +1,14 @@ -go.guido-berhoerster.org/managesieve v0.0.0-20201026131555-3fe1614de42c h1:4HErjjy83de5F6xWn9Fd+N31KDJh0h1jibO6n0Ye6lw= -go.guido-berhoerster.org/managesieve v0.0.0-20201026131555-3fe1614de42c/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98= -go.guido-berhoerster.org/managesieve v0.0.0-20201026142443-8413916df2be h1:pKZGpXqtVG/1d16ZzVMYzjXV09q1jPU+6BsdvVVVqZU= -go.guido-berhoerster.org/managesieve v0.0.0-20201026142443-8413916df2be/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98= go.guido-berhoerster.org/managesieve v0.0.0-20201027164714-f9bb517e9447 h1:VdMnQ1Nq0N6cY/ViKe1v0gUURhyWCN2WgCPJfnz6c9Y= go.guido-berhoerster.org/managesieve v0.0.0-20201027164714-f9bb517e9447/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/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-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M= +golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=