INNER CODE UNIT · Go
init
nicholas-fedor/watchtower · cmd/root.go:123
func init() {
flags.SetDefaults()
flags.RegisterAll(rootCmd)
}
// NewRootCommand creates and configures the root command for the Watchtower CLI.
//
// It establishes the base usage string ("watchtower"), a short description summarizing its purpose,
// and a long description with additional context and a project URL.
//
// PreRun and Run are wired in Execute with a logger-capturing process instance so the
// composition root can pass *zerolog.Logger without a package-level global.
//
// Returns:
// - *cobra.Command: A pointer to the fully configured root command, ready for flag registration and execution.
func NewRootCommand() *cobra.Command {
return &cobra.Command{
Use: "watchtower",