This adds more logging in certain places, and adds logging to the CLI. It also allows for certain commands in the CLI to be used without a daemon connection, namely `init`, which previously required the daemon to be connected, but now does not since it doesnt need it.
17 lines
295 B
Go
17 lines
295 B
Go
package commands
|
|
|
|
import (
|
|
"github.com/juls0730/flux/pkg"
|
|
"github.com/juls0730/flux/pkg/API"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
type CommandCtx struct {
|
|
Config pkg.CLIConfig
|
|
Logger *zap.SugaredLogger
|
|
Info *API.Info
|
|
Interactive bool
|
|
}
|
|
|
|
type CommandFunc func(CommandCtx, []string) error
|