Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var YamlCheckCmd = &gcli.Command{ Name: "check", Aliases: []string{"validate"}, Desc: "validate YAML contents format", Config: func(c *gcli.Command) { }, Func: func(c *gcli.Command, _ []string) error { return errorx.New("TODO") }, }
YamlCheckCmd instance
View Source
var YamlToJSONCmd = &gcli.Command{ Name: "json", Aliases: []string{"to-json"}, Desc: "convert create table SQL to markdown table", Config: func(c *gcli.Command) { c.AddArg("yaml", "input yaml contents for convert") }, Func: func(c *gcli.Command, _ []string) error { src, err := apputil.ReadSource(c.Arg("yaml").String()) if err != nil { return err } bs, err := yaml.YAMLToJSON([]byte(src)) if err != nil { return err } fmt.Println(string(bs)) return nil }, }
YamlToJSONCmd instance
View Source
var YamlToolCmd = &gcli.Command{ Name: "yaml", Desc: "yaml format contents tool commands", Subs: []*gcli.Command{ YamlViewCmd, YamlCheckCmd, YamlToJSONCmd, }, }
YamlToolCmd instance
View Source
var YamlViewCmd = &gcli.Command{ Name: "view", Aliases: []string{"cat", "fmt"}, Desc: "convert create table SQL to markdown table", Config: func(c *gcli.Command) { }, Func: func(c *gcli.Command, _ []string) error { return errorx.New("TODO") }, }
YamlViewCmd instance
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.