summaryrefslogtreecommitdiff
path: root/internal/server/handlers/basehandler.go
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2024-02-23 15:01:41 +0200
committerPaul Buetow <pbuetow@mimecast.com>2024-03-29 17:16:39 +0200
commit0f718c963e118139c893e9c52092e278bcd3b396 (patch)
treedce61c6695bc3badd455a64767252e6947b32711 /internal/server/handlers/basehandler.go
parent7a0b0cde9c7c46d5f70ebc4a9d4f4e718d835f70 (diff)
lint warnings
Diffstat (limited to 'internal/server/handlers/basehandler.go')
-rw-r--r--internal/server/handlers/basehandler.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/server/handlers/basehandler.go b/internal/server/handlers/basehandler.go
index 7daf071..f6ab3db 100644
--- a/internal/server/handlers/basehandler.go
+++ b/internal/server/handlers/basehandler.go
@@ -130,7 +130,7 @@ func (h *baseHandler) Write(p []byte) (n int, err error) {
for _, b := range p {
switch b {
case ';':
- h.handleCommand(string(h.writeBuf.Bytes()))
+ h.handleCommand(h.writeBuf.String())
h.writeBuf.Reset()
default:
h.writeBuf.WriteByte(b)
@@ -252,15 +252,15 @@ func (h *baseHandler) handleOptions(options map[string]string) {
// We can read the options only once, will cause a data race otherwise if
// changed multiple times for multiple incoming commands.
h.once.Do(func() {
- if quiet, _ := options["quiet"]; quiet == "true" {
+ if quiet := options["quiet"]; quiet == "true" {
dlog.Server.Debug(h.user, "Enabling quiet mode")
h.quiet = true
}
- if plain, _ := options["plain"]; plain == "true" {
+ if plain := options["plain"]; plain == "true" {
dlog.Server.Debug(h.user, "Enabling plain mode")
h.plain = true
}
- if serverless, _ := options["serverless"]; serverless == "true" {
+ if serverless := options["serverless"]; serverless == "true" {
dlog.Server.Debug(h.user, "Enabling serverless mode")
h.serverless = true
}