pkg/

directory
v0.47.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 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: ExamplePodman: headers := report.Headers(struct { ID string }{}, nil) f := report.New(os.Stdout, "Command Name") f, _ := f.Parse(report.OriginPodman, "{{range .}}{{.ID}}{{end}}") defer f.Flush() if f.RenderHeaders { f.Execute(headers) } f.Execute( map[string]string{ "ID":"fa85da03b40141899f3af3de6d27852b", }) // Output: // ID // fa85da03b40141899f3af3de6d27852b ExampleUser: headers := report.Headers(struct { CID string }{}, map[string]string{"CID":"ID"}) f, _ := report.New(os.Stdout, "Command Name").Parse(report.OriginUser, "table {{.CID}}") defer f.Flush() if f.RenderHeaders { t.Execute(t, headers) } t.Execute(t,map[string]string{ "CID":"fa85da03b40141899f3af3de6d27852b", }) // Output: // ID // fa85da03b40141899f3af3de6d27852b 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: ExamplePodman: headers := report.Headers(struct { ID string }{}, nil) f := report.New(os.Stdout, "Command Name") f, _ := f.Parse(report.OriginPodman, "{{range .}}{{.ID}}{{end}}") defer f.Flush() if f.RenderHeaders { f.Execute(headers) } f.Execute( map[string]string{ "ID":"fa85da03b40141899f3af3de6d27852b", }) // Output: // ID // fa85da03b40141899f3af3de6d27852b ExampleUser: headers := report.Headers(struct { CID string }{}, map[string]string{"CID":"ID"}) f, _ := report.New(os.Stdout, "Command Name").Parse(report.OriginUser, "table {{.CID}}") defer f.Flush() if f.RenderHeaders { t.Execute(t, headers) } t.Execute(t,map[string]string{ "CID":"fa85da03b40141899f3af3de6d27852b", }) // Output: // ID // fa85da03b40141899f3af3de6d27852b 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.
Signal handling for Linux only.
Signal handling for Linux only.

Jump to

Keyboard shortcuts

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