From 6a59683c01f053ab6490a82f64985aeea9894358 Mon Sep 17 00:00:00 2001 From: cameronconradt <16780811+cameronconradt@users.noreply.github.com> Date: Fri, 23 Mar 2018 23:57:35 -0600 Subject: [PATCH 1/2] Update files.go Should suppress the warnings about the naming of these two functions. Added TODO --- pkg/chartutil/files.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/chartutil/files.go b/pkg/chartutil/files.go index a711a3366..f9fc0a26d 100644 --- a/pkg/chartutil/files.go +++ b/pkg/chartutil/files.go @@ -211,7 +211,8 @@ func ToToml(v interface{}) string { // always return a string, even on marshal error (empty string). // // This is designed to be called from a template. -func ToJson(v interface{}) string { +//TODO:change the function signature in Helm 3 +func ToJson(v interface{}) string { //nolint data, err := json.Marshal(v) if err != nil { // Swallow errors inside of a template. @@ -226,7 +227,8 @@ func ToJson(v interface{}) string { // JSON documents. Additionally, because its intended use is within templates // it tolerates errors. It will insert the returned error message string into // m["Error"] in the returned map. -func FromJson(str string) map[string]interface{} { +//TODO:change the function signature in Helm 3 +func FromJson(str string) map[string]interface{} { //nolint m := map[string]interface{}{} if err := json.Unmarshal([]byte(str), &m); err != nil { From 718578036d4c13604ec557a32dfd31b5403aac31 Mon Sep 17 00:00:00 2001 From: BarryWilliams Date: Mon, 23 Apr 2018 22:25:11 -0400 Subject: [PATCH 2/2] Changed whitespacing in comments --- pkg/chartutil/files.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/chartutil/files.go b/pkg/chartutil/files.go index f9fc0a26d..a09bb8f43 100644 --- a/pkg/chartutil/files.go +++ b/pkg/chartutil/files.go @@ -211,8 +211,8 @@ func ToToml(v interface{}) string { // always return a string, even on marshal error (empty string). // // This is designed to be called from a template. -//TODO:change the function signature in Helm 3 -func ToJson(v interface{}) string { //nolint +// TODO: change the function signature in Helm 3 +func ToJson(v interface{}) string { // nolint data, err := json.Marshal(v) if err != nil { // Swallow errors inside of a template. @@ -227,8 +227,8 @@ func ToJson(v interface{}) string { //nolint // JSON documents. Additionally, because its intended use is within templates // it tolerates errors. It will insert the returned error message string into // m["Error"] in the returned map. -//TODO:change the function signature in Helm 3 -func FromJson(str string) map[string]interface{} { //nolint +// TODO: change the function signature in Helm 3 +func FromJson(str string) map[string]interface{} { // nolint m := map[string]interface{}{} if err := json.Unmarshal([]byte(str), &m); err != nil {