Remove StatusSensitiveInput

This commit is contained in:
Adnan Maolood 2021-03-08 14:08:45 -05:00
parent 7d958a4798
commit dea7600f29
2 changed files with 2 additions and 5 deletions

View File

@ -84,7 +84,7 @@ func trustCertificate(hostname string, cert *x509.Certificate) error {
}
}
func getInput(prompt string, sensitive bool) (input string, ok bool) {
func getInput(prompt string) (input string, ok bool) {
fmt.Printf("%s ", prompt)
scanner.Scan()
return scanner.Text(), true
@ -102,7 +102,7 @@ func do(req *gemini.Request, via []*gemini.Request) (*gemini.Response, error) {
switch resp.Status.Class() {
case gemini.StatusInput:
input, ok := getInput(resp.Meta, resp.Status == gemini.StatusSensitiveInput)
input, ok := getInput(resp.Meta)
if !ok {
break
}

View File

@ -6,7 +6,6 @@ type Status int
// Gemini status codes.
const (
StatusInput Status = 10
StatusSensitiveInput Status = 11
StatusSuccess Status = 20
StatusRedirect Status = 30
StatusPermanentRedirect Status = 31
@ -37,8 +36,6 @@ func (s Status) String() string {
switch s {
case StatusInput:
return "Input"
case StatusSensitiveInput:
return "Sensitive input"
case StatusSuccess:
return "Success"
case StatusRedirect: