mirror of
https://github.com/helm/helm.git
synced 2026-08-05 15:40:40 +00:00
Document ToYaml function
This commit is contained in:
@@ -146,6 +146,10 @@ func (f Files) AsSecrets() string {
|
||||
return ToYaml(m)
|
||||
}
|
||||
|
||||
// ToYaml takes an interface, marshals it to yaml, and returns a string. It will
|
||||
// always return a string, even on marshal error (empty string).
|
||||
//
|
||||
// This is designed to be called from a template.
|
||||
func ToYaml(v interface{}) string {
|
||||
data, err := yaml.Marshal(v)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user