MCPcopy Create free account
hub / github.com/carvel-dev/kapp-controller / ConfigureUI

Method ConfigureUI

cli/pkg/kctrl/cmd/ui_flags.go:33–57  ·  view source on GitHub ↗
(ui *ui.ConfUI)

Source from the content-addressed store, hash-verified

31}
32
33func (f *UIFlags) ConfigureUI(ui *ui.ConfUI) {
34 if f.Color {
35 ui.EnableColor()
36 }
37
38 if f.JSON {
39 ui.EnableJSON()
40 }
41
42 if f.NonInteractive {
43 ui.EnableNonInteractive()
44 }
45
46 if len(f.Columns) > 0 {
47 headers := []uitable.Header{}
48 for _, col := range f.Columns {
49 headers = append(headers, uitable.Header{
50 Key: uitable.KeyifyHeader(col),
51 Hidden: false,
52 })
53 }
54
55 ui.ShowColumns(headers)
56 }
57}

Callers 1

configureGlobalFlagsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected