MCPcopy
hub / github.com/helm/helm / Write

Method Write

pkg/cli/output/output.go:63–73  ·  view source on GitHub ↗

Write the output in the given format to the io.Writer. Unsupported formats will return an error

(out io.Writer, w Writer)

Source from the content-addressed store, hash-verified

61// Write the output in the given format to the io.Writer. Unsupported formats
62// will return an error
63func (o Format) Write(out io.Writer, w Writer) error {
64 switch o {
65 case Table:
66 return w.WriteTable(out)
67 case JSON:
68 return w.WriteJSON(out)
69 case YAML:
70 return w.WriteYAML(out)
71 }
72 return ErrInvalidFormatType
73}
74
75// ParseFormat takes a raw string and returns the matching Format.
76// If the format does not exist, ErrInvalidFormatType is returned

Callers 15

newStatusCmdFunction · 0.95
newRepoListCmdFunction · 0.95
newGetMetadataCmdFunction · 0.95
newInstallCmdFunction · 0.95
newUpgradeCmdFunction · 0.95
newHistoryCmdFunction · 0.95
newGetValuesCmdFunction · 0.95
newListCmdFunction · 0.95
TestLoadInvalidArchiveFunction · 0.45
makeTestChartArchiveFunction · 0.45
writeToTarFunction · 0.45
createChartArchiveFunction · 0.45

Calls 3

WriteTableMethod · 0.65
WriteJSONMethod · 0.65
WriteYAMLMethod · 0.65

Tested by 15

TestLoadInvalidArchiveFunction · 0.36
makeTestChartArchiveFunction · 0.36
createChartArchiveFunction · 0.36
TestHTTPURLLoader_LoadFunction · 0.36
TestReadFileFunction · 0.36
startLocalServerForTestsFunction · 0.36
startLocalServerForTestsFunction · 0.36
TestDownloadIndexFileFunction · 0.36