1
0
mirror of https://github.com/lxc/incus.git synced 2026-02-05 09:46:19 +01:00

incus-agent: Code cleanup

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
Stéphane Graber
2025-12-19 01:52:27 -05:00
parent 2b9d3b28f4
commit a9cab98afc
3 changed files with 5 additions and 3 deletions

View File

@@ -8,9 +8,10 @@ import (
// A Daemon can respond to requests from a shared client.
type Daemon struct {
// Event servers
// Event servers.
events *events.Server
// Paths.
secretsLocation string
// ContextID and port of the host socket server.

View File

@@ -1,6 +1,7 @@
package main
import (
"fmt"
"os"
"runtime"
@@ -48,6 +49,7 @@ func main() {
// Run the main command and handle errors
err := app.Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
}

View File

@@ -47,8 +47,7 @@ func (c *cmdAgent) Command() *cobra.Command {
func (c *cmdAgent) Run(cmd *cobra.Command, args []string) error {
if c.global.flagService {
err := runService("Incus-Agent", c)
return err
return runService("Incus-Agent", c)
}
// Setup logger.