]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - cmd/safcm-remote/main.go
sync: simplify LogFunc to take the log message as string
[safcm/safcm.git] / cmd / safcm-remote / main.go
index e9ce1cd0ccac627e6573bc5b07c040166cb4be65..a29f20c171747ac6f3a72935c33a1ca6e162dd8a 100644 (file)
@@ -1,4 +1,4 @@
-// Helper copied to the remote hosts to run commands and deploy configuration
+// Helper copied to the remote host to run commands and deploy configuration
 
 // Copyright (C) 2021  Simon Ruderich
 //
@@ -73,11 +73,11 @@ func mainLoop() error {
        conn := safcm.NewGobConn(os.Stdin, os.Stdout)
 
        var logLevel safcm.LogLevel
-       logFunc := func(level safcm.LogLevel, format string, a ...interface{}) {
+       logFunc := func(level safcm.LogLevel, msg string) {
                if logLevel >= level {
                        conn.Send(safcm.MsgLog{
                                Level: level,
-                               Text:  fmt.Sprintf(format, a...),
+                               Text:  msg,
                        })
                }
        }