Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SyncCmd = &cobra.Command{ Use: "sync", Short: "sync effx.yaml file(s) to the effx api", Long: `sync effx.yaml file(s) to the effx api`, Run: func(cmd *cobra.Command, args []string) { if apiKeyString == "" && !isDryRun { if apiKeyString = os.Getenv(effxApiKeyName); apiKeyString == "" { log.Fatal("api key is required") } } if filePathString == "" && directoryString == "" { log.Fatal("-f <file_path> or -d <directory> is required") } if filePathString != "" && directoryString != "" { log.Fatal("-f <file_path> and -d <directory> cannot be used together") } if filePathString != "" { if matched, err := isEffxYaml(filePathString); err != nil { log.Fatalf("unexpected error: %v", err) } else { if matched { if err := processFile(filePathString); err != nil { log.Fatalf("error: %v", err) } } else { log.Fatalf("file_path %s is invalid", filePathString) } } } else { if err := processDirectory(directoryString); err != nil { log.Fatalf("error: %v", err) } } }, }
Functions ¶
func Initialize ¶
func Initialize()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.