diff options
| author | Paul Buetow <paul@buetow.org> | 2021-10-31 17:29:29 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-10-31 17:29:29 +0200 |
| commit | 0ad1a810131f79f51546ecbd75419119c799937d (patch) | |
| tree | f9e84fc2db0a7e20e325ff37339a8b7ba680084b /internal | |
| parent | 2dbfcfc56ecf564cf301e1479522f83d6ca0c966 (diff) | |
rename spartan mode to plain mode
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/config/args.go | 8 | ||||
| -rw-r--r-- | internal/config/initializer.go | 4 | ||||
| -rw-r--r-- | internal/server/handlers/basehandler.go | 10 |
3 files changed, 11 insertions, 11 deletions
diff --git a/internal/config/args.go b/internal/config/args.go index 859166d..5b1fc1e 100644 --- a/internal/config/args.go +++ b/internal/config/args.go @@ -35,7 +35,7 @@ type Args struct { SSHPrivateKeyPathFile string Serverless bool ServersStr string - Spartan bool + Plain bool Timeout int TrustAllHosts bool UserName string @@ -67,7 +67,7 @@ func (a *Args) String() string { sb.WriteString(fmt.Sprintf("%s:%v,", "SSHPort", a.SSHPort)) sb.WriteString(fmt.Sprintf("%s:%v,", "Serverless", a.Serverless)) sb.WriteString(fmt.Sprintf("%s:%v,", "ServersStr", a.ServersStr)) - sb.WriteString(fmt.Sprintf("%s:%v,", "Spartan", a.Spartan)) + sb.WriteString(fmt.Sprintf("%s:%v,", "Plain", a.Plain)) sb.WriteString(fmt.Sprintf("%s:%v,", "Timeout", a.Timeout)) sb.WriteString(fmt.Sprintf("%s:%v,", "TrustAllHosts", a.TrustAllHosts)) sb.WriteString(fmt.Sprintf("%s:%v,", "UserName", a.UserName)) @@ -84,8 +84,8 @@ func (a *Args) SerializeOptions() string { if a.Quiet { options["quiet"] = fmt.Sprintf("%v", a.Quiet) } - if a.Spartan { - options["spartan"] = fmt.Sprintf("%v", a.Spartan) + if a.Plain { + options["plain"] = fmt.Sprintf("%v", a.Plain) } if a.Serverless { options["serverless"] = fmt.Sprintf("%v", a.Serverless) diff --git a/internal/config/initializer.go b/internal/config/initializer.go index 2f4e7cc..f8af8bc 100644 --- a/internal/config/initializer.go +++ b/internal/config/initializer.go @@ -123,8 +123,8 @@ func (in *initializer) optimusPrime(sourceCb transformCb, args *Args, // Source type specific transormations. sourceCb(in, args, additionalArgs) - // Spartan mode. - if args.Spartan { + // Plain mode. + if args.Plain { args.Quiet = true args.NoColor = true in.Client.TermColorsEnable = false diff --git a/internal/server/handlers/basehandler.go b/internal/server/handlers/basehandler.go index 53bf375..897ff81 100644 --- a/internal/server/handlers/basehandler.go +++ b/internal/server/handlers/basehandler.go @@ -44,7 +44,7 @@ type baseHandler struct { once sync.Once mutex sync.Mutex quiet bool - spartan bool + plain bool serverless bool } @@ -96,7 +96,7 @@ func (h *baseHandler) Read(p []byte) (n int, err error) { n = copy(p, h.readBuf.Bytes()) case line := <-h.lines: - if !h.spartan { + if !h.plain { h.readBuf.WriteString("REMOTE") h.readBuf.WriteString(protocol.FieldDelimiter) h.readBuf.WriteString(h.hostname) @@ -255,9 +255,9 @@ func (h *baseHandler) handleOptions(options map[string]string) { dlog.Server.Debug(h.user, "Enabling quiet mode") h.quiet = true } - if spartan, _ := options["spartan"]; spartan == "true" { - dlog.Server.Debug(h.user, "Enabling spartan mode") - h.spartan = true + if plain, _ := options["plain"]; plain == "true" { + dlog.Server.Debug(h.user, "Enabling plain mode") + h.plain = true } if serverless, _ := options["serverless"]; serverless == "true" { dlog.Server.Debug(h.user, "Enabling serverless mode") |
