MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / Set

Method Set

internal/cmd/plugin/color.go:50–59  ·  view source on GitHub ↗

Set sets the color configuration

(val string)

Source from the content-addressed store, hash-verified

48
49// Set sets the color configuration
50func (e *colorConfiguration) Set(val string) error {
51 colorVal := colorConfiguration(val)
52 switch colorVal {
53 case colorAlways, colorAuto, colorNever:
54 *e = colorVal
55 return nil
56 default:
57 return fmt.Errorf("should be one of 'always', 'auto', or 'never'")
58 }
59}
60
61// Type returns the data type of the flag used for the color configuration
62func (e *colorConfiguration) Type() string {

Callers 15

clusterMatchesPodFunction · 0.45
buildJdbcMethod · 0.45
collector_test.goFile · 0.45
UpdateMethod · 0.45
serveCacheMethod · 0.45
pgStatusMethod · 0.45
pgControlDataMethod · 0.45
sendJSONResponseFunction · 0.45
StartMethod · 0.45
request_test.goFile · 0.45

Calls 1

colorConfigurationTypeAlias · 0.85

Tested by

no test coverage detected