pkg/

directory
v0.33.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2021 License: Apache-2.0

Directories

Path Synopsis
internal/supported/supportedfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Package report provides helper structs/methods/funcs for formatting output To format output for an array of structs: w := report.NewWriterDefault(os.Stdout) defer w.Flush() headers := report.Headers(struct { ID string }{}, nil) t, _ := report.NewTemplate("command name").Parse("{{range .}}{{.ID}}{{end}}") t.Execute(t, headers) t.Execute(t, map[string]string{ "ID":"fa85da03b40141899f3af3de6d27852b", }) // t.IsTable() == false or w := report.NewWriterDefault(os.Stdout) defer w.Flush() headers := report.Headers(struct { CID string }{}, map[string]string{ "CID":"ID"}) t, _ := report.NewTemplate("command name").Parse("table {{.CID}}") t.Execute(t, headers) t.Execute(t,map[string]string{ "CID":"fa85da03b40141899f3af3de6d27852b", }) // t.IsTable() == true Helpers: if report.IsJSON(cmd.Flag("format").Value.String()) { ...
Package report provides helper structs/methods/funcs for formatting output To format output for an array of structs: w := report.NewWriterDefault(os.Stdout) defer w.Flush() headers := report.Headers(struct { ID string }{}, nil) t, _ := report.NewTemplate("command name").Parse("{{range .}}{{.ID}}{{end}}") t.Execute(t, headers) t.Execute(t, map[string]string{ "ID":"fa85da03b40141899f3af3de6d27852b", }) // t.IsTable() == false or w := report.NewWriterDefault(os.Stdout) defer w.Flush() headers := report.Headers(struct { CID string }{}, map[string]string{ "CID":"ID"}) t, _ := report.NewTemplate("command name").Parse("table {{.CID}}") t.Execute(t, headers) t.Execute(t,map[string]string{ "CID":"fa85da03b40141899f3af3de6d27852b", }) // t.IsTable() == true Helpers: if report.IsJSON(cmd.Flag("format").Value.String()) { ...
camelcase
Package camelcase is a micro package to split the words of a camelcase type string into a slice of words.
Package camelcase is a micro package to split the words of a camelcase type string into a slice of words.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL