Documentation
¶
Overview ¶
Package cmd is used for Cobra and Viper integration.
0.2.4 Created by senzing-factory/github-action-make-go-github-file.yaml on Wed May 21 18:25:18 UTC 2025
Index ¶
Constants ¶
View Source
const ( Short string = "Validates a JSON-lines file." Use string = "validate" Long string = `` /* 341-byte string literal not displayed */ )
Variables ¶
View Source
var CompletionCmd = &cobra.Command{ Use: "completion", Short: "Generate bash completion for the command", Long: `To load completions, run: source < (validate completion) To load completions automatically on login, add this line to your .bashrc file: source < (validate completion) `, RunE: func(cmd *cobra.Command, args []string) error { _ = cmd _ = args return completionAction(os.Stdout) }, }
CompletionCmd represents the completion command.
View Source
var ContextVariables = append(ContextVariablesForMultiPlatform, ContextVariablesForOsArch...)
View Source
var ContextVariablesForMultiPlatform = []option.ContextVariable{ option.CoreInstanceName.SetDefault(fmt.Sprintf("validate-%d", time.Now().Unix())), option.InputFileType, option.InputURL, option.JSONOutput, option.LogLevel, }
View Source
var ContextVariablesForOsArch = []option.ContextVariable{}
View Source
var DocsCmd = &cobra.Command{ Use: "docs", Short: "Generate documentation for the command", RunE: func(cmd *cobra.Command, args []string) error { _ = args dir, err := cmd.Flags().GetString("dir") if err != nil { return wraperror.Errorf(err, "getting 'dir' value") } if dir == "" { if dir, err = os.MkdirTemp("", "validate"); err != nil { return wraperror.Errorf(err, "constructing cobra.Command") } } return DocsAction(os.Stdout, dir) }, }
DocsCmd represents the docs command.
View Source
var RootCmd = &cobra.Command{ Use: Use, Short: Short, Long: Long, PreRun: PreRun, RunE: RunE, Version: Version(), }
RootCmd represents the command.
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the RootCmd.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.