aboutsummaryrefslogtreecommitdiffstats
path: root/commands/compose/send.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/compose/send.go')
-rw-r--r--commands/compose/send.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/commands/compose/send.go b/commands/compose/send.go
index 13d9fd4a..f95e1447 100644
--- a/commands/compose/send.go
+++ b/commands/compose/send.go
@@ -326,29 +326,29 @@ func (s *sendmailSender) Close() error {
return ce
}
-func parseScheme(uri *url.URL) (scheme string, auth string, err error) {
- scheme = ""
+func parseScheme(uri *url.URL) (protocol string, auth string, err error) {
+ protocol = ""
auth = "plain"
if uri.Scheme != "" {
parts := strings.Split(uri.Scheme, "+")
switch len(parts) {
case 1:
- scheme = parts[0]
+ protocol = parts[0]
case 2:
if parts[1] == "insecure" {
- scheme = uri.Scheme
+ protocol = uri.Scheme
} else {
- scheme = parts[0]
+ protocol = parts[0]
auth = parts[1]
}
case 3:
- scheme = parts[0] + "+" + parts[1]
+ protocol = parts[0] + "+" + parts[1]
auth = parts[2]
default:
- return "", "", fmt.Errorf("Unknown transfer protocol %s", uri.Scheme)
+ return "", "", fmt.Errorf("Unknown scheme %s", uri.Scheme)
}
}
- return scheme, auth, nil
+ return protocol, auth, nil
}
func newSaslClient(auth string, uri *url.URL) (sasl.Client, error) {