Help us shape the future of Go! Take the 2026 Go Developer Survey

initialize

package
v1.23.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "init",
	Short: "Initialize a Anthos Configuration Management directory",
	Long: `Initialize a Anthos Configuration Management directory

Set up a working Anthos Configuration Management directory with a default Repo object, documentation,
and directories.

By default, does not initialize directories containing files. Use --force to
initialize nonempty directories.`,
	Example: `  nomos init
  nomos init --path=my/directory
  nomos init --path=/path/to/my/directory`,
	Args: cobra.ExactArgs(0),
	RunE: func(cmd *cobra.Command, _ []string) error {

		cmd.SilenceUsage = true

		return Initialize(flags.Path, forceValue)
	},
	PostRunE: func(_ *cobra.Command, _ []string) error {
		_, err := fmt.Fprintf(os.Stdout, "Done!\n")
		return err
	},
}

Cmd is the Cobra object representing the nomos init command

Functions

func Initialize

func Initialize(root string, force bool) error

Initialize initializes a Nomos directory

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL