diff options
| author | adnano <[email protected]> | 2020-10-11 21:55:30 -0400 |
|---|---|---|
| committer | adnano <[email protected]> | 2020-10-11 21:55:30 -0400 |
| commit | 3b5cc23d284512cfad768a67b5962dd8e302b0c1 (patch) | |
| tree | 272cc5f0b884961bf2a24c6a9b9828baea418c14 | |
| parent | Detect mimetypes (diff) | |
| download | go-gemini-3b5cc23d284512cfad768a67b5962dd8e302b0c1.tar.xz go-gemini-3b5cc23d284512cfad768a67b5962dd8e302b0c1.zip | |
Remove dependency on golang.org/x/crypto
| -rw-r--r-- | examples/client/client.go | 14 | ||||
| -rw-r--r-- | go.mod | 2 | ||||
| -rw-r--r-- | go.sum | 8 |
3 files changed, 2 insertions, 22 deletions
diff --git a/examples/client/client.go b/examples/client/client.go index 534c5a3..4d61868 100644 --- a/examples/client/client.go +++ b/examples/client/client.go @@ -8,11 +8,9 @@ import ( "crypto/x509" "fmt" "os" - "syscall" "time" "git.sr.ht/~adnano/gmi" - "golang.org/x/crypto/ssh/terminal" ) var ( @@ -77,16 +75,8 @@ func sendRequest(req *gmi.Request) error { switch resp.Status / 10 { case gmi.StatusClassInput: fmt.Printf("%s: ", resp.Meta) - if resp.Status == gmi.StatusSensitiveInput { - input, err := terminal.ReadPassword(int(syscall.Stdin)) - if err != nil { - return err - } - req.URL.RawQuery = string(input) - } else { - scanner.Scan() - req.URL.RawQuery = scanner.Text() - } + scanner.Scan() + req.URL.RawQuery = scanner.Text() return sendRequest(req) case gmi.StatusClassSuccess: fmt.Print(string(resp.Body)) @@ -1,5 +1,3 @@ module git.sr.ht/~adnano/gmi go 1.15 - -require golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a @@ -1,8 +0,0 @@ -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 h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= |