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:
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user