diff options
| author | Paul Buetow <git@mx.buetow.org> | 2020-12-26 11:44:31 +0000 |
|---|---|---|
| committer | Paul Buetow <git@mx.buetow.org> | 2020-12-26 11:44:31 +0000 |
| commit | 60fa324cd5296b088c24d8db1d334a25ca955788 (patch) | |
| tree | 88c14b39b66f5273cebf96307c86293b178cce40 /internal/server | |
| parent | ab676c2b484225ed22765b23d8f0545088ecd610 (diff) | |
initial spartan mode support
Diffstat (limited to 'internal/server')
| -rw-r--r-- | internal/server/handlers/serverhandler.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/server/handlers/serverhandler.go b/internal/server/handlers/serverhandler.go index 3d1a53d..5b948b3 100644 --- a/internal/server/handlers/serverhandler.go +++ b/internal/server/handlers/serverhandler.go @@ -43,6 +43,7 @@ type ServerHandler struct { ackCloseReceived chan struct{} activeCommands int32 activeReaders int32 + spartan bool } // NewServerHandler returns the server handler. @@ -245,6 +246,12 @@ func (h *ServerHandler) handleUserCommand(ctx context.Context, argc int, args [] commandFinished() return } + if spartan, ok := options["spartan"]; ok { + if spartan == "true" { + logger.Debug(h.user, "Enabling spartan mode") + h.spartan = true + } + } switch commandName { case "grep", "cat": |
