Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "ds", Short: "A swiss army tool for markup languages like json, yaml, and toml.", Long: `A swiss army tool for markup languages like json, yaml, and toml. ds will try to figure out automagically what the type of any file passed in is. It uses a couple methods to do this. First, the file extension: - .yaml/.yml: YAML - .toml: TOML - .json: JSON - .xml: XML If the file extension is unknown, it will try a series of parsers until one works (in this order): 1. JSON 2. TOML 3. XML 3. YAML If it fails, or you want to be extra sure it's using the right parser, you can also specify the file type. These will override the file name, and supported values are: - yaml/yml - json - toml - xml `, PersistentPreRun: func(cmd *cobra.Command, args []string) { if verbose { logrus.SetLevel(logrus.DebugLevel) } else { logrus.SetLevel(logrus.FatalLevel) } if compact { for _, parser := range parsers { if parser.lang == JSON { parser.marshal = json.Marshal } } } }, }
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.