var DemoClusterCreate = &cobra.Command{ Use: "demo [string to print]", Short: "demo anything to the screen", Long: `demo is for printing anything back to the screen. For many years people have printed back to the screen.`, RunE: createDemoCluster, DisableFlagParsing: true, }
skeetw@N-20HEPF12NB62 MINGW64 /d/CSF_NCM/CSF-NUKE-CLI (1.0) $ go run nuke.go create cluster demo --cert xxxx --csf-grocery=false required flag(s) "region" not set demo is for printing anything back to the screen. For many years people have printed back to the screen.
Usage: nuke create cluster demo [string to print] [flags]
Flags: -h, --help help for demo -r, --region string (required) AWS region (default "zone-a")
Global Flags: --datacenter-server-api string data center server api (default "http://127.0.0.1:5678") --log string nuke log level [debug, info] (default "info") -o, --output string result output format. [json, yaml, file] (default "json") --output-folder string when output type if file, all result files will be save to this folder. (default "./output/") --wrap-processbar if need to wrap process bar when running a long task (default true)
exit status 1
skeetw@N-20HEPF12NB62 MINGW64 /d/CSF_NCM/CSF-NUKE-CLI (1.0) $ go run nuke.go create cluster demo --cert xxxx --csf-grocery=false --region=989 csf-grocery false cert xxxx 989
skeetw@N-20HEPF12NB62 MINGW64 /d/CSF_NCM/CSF-NUKE-CLI (1.0) $ go run nuke.go create cluster demo --cert xxxx --region=989 cert xxxx 989
skeetw@N-20HEPF12NB62 MINGW64 /d/CSF_NCM/CSF-NUKE-CLI (1.0) $ go run nuke.go create cluster demo --region=989 989
skeetw@N-20HEPF12NB62 MINGW64 /d/CSF_NCM/CSF-NUKE-CLI (1.0) $ go run nuke.go create cluster demo demo is for printing anything back to the screen. For many years people have printed back to the screen.
Usage: nuke create cluster demo [string to print] [flags]
Flags: -h, --help help for demo -r, --region string (required) AWS region (default "zone-a")
Global Flags: --datacenter-server-api string data center server api (default "http://127.0.0.1:5678") --log string nuke log level [debug, info] (default "info") -o, --output string result output format. [json, yaml, file] (default "json") --output-folder string when output type if file, all result files will be save to this folder. (default "./output/") --wrap-processbar if need to wrap process bar when running a long task (default true)
funcgetEncoder() zapcore.Encoder { encoderConfig := zap.NewProductionEncoderConfig() // The format time can be customized encoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder encoderConfig.EncodeLevel = zapcore.CapitalLevelEncoder return zapcore.NewConsoleEncoder(encoderConfig) }
// Save file log cut funcgetLogWriter() zapcore.WriteSyncer { lumberJackLogger := &lumberjack.Logger{ Filename: "./nuke.log", // Log name MaxSize: 10, // File content size, MB MaxBackups: 5, // Maximum number of old files retained MaxAge: 30, // Maximum number of days to keep old files Compress: false, // Is the file compressed } return zapcore.AddSync(lumberJackLogger) }