summaryrefslogtreecommitdiff
path: root/internal/server/handlers/healthhandler.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server/handlers/healthhandler.go')
-rw-r--r--internal/server/handlers/healthhandler.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/server/handlers/healthhandler.go b/internal/server/handlers/healthhandler.go
index 347ff66..8d6c400 100644
--- a/internal/server/handlers/healthhandler.go
+++ b/internal/server/handlers/healthhandler.go
@@ -35,24 +35,23 @@ func NewHealthHandler(user *user.User) *HealthHandler {
if err != nil {
dlog.Server.FatalPanic(err)
}
-
s := strings.Split(fqdn, ".")
h.hostname = s[0]
-
return &h
}
-func (h *HealthHandler) handleHealthCommand(ctx context.Context, argc int, args []string,
- commandName string, options map[string]string) {
- dlog.Server.Debug(h.user, "Handling health command", argc, args)
+func (h *HealthHandler) handleHealthCommand(ctx context.Context, argc int,
+ args []string, commandName string, options map[string]string) {
+ dlog.Server.Debug(h.user, "Handling health command", argc, args)
switch commandName {
case "health":
h.send(h.serverMessages, "OK")
case ".ack":
h.handleAckCommand(argc, args)
default:
- h.send(h.serverMessages, dlog.Server.Error(h.user, "Received unknown health command", commandName, argc, args))
+ h.send(h.serverMessages, dlog.Server.Error(h.user,
+ "Received unknown health command", commandName, argc, args))
}
h.shutdown()
}