Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InitCmd = &cobra.Command{ Use: "init", Short: "Creates a 'rex.yaml' file on your current path", Run: func(cmd *cobra.Command, args []string) { cwd, err := os.Getwd() if err != nil { panic(err) } configFile := filepath.Join(cwd, "rex.yaml") if !isForce { if _, err := os.Stat(configFile); !os.IsNotExist(err) { color.Red("rex.yaml exists. Use 'rex init --force' to overwrite") os.Exit(1) } } else { err := os.Remove(configFile) if err != nil { panic(err) } } newInitFile(configFile) }, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.