From 5657ea7f0070b0151b3d859a368b8c375cfc44ad Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Fri, 1 Nov 2019 14:44:26 -0700 Subject: [PATCH] fix(chart): add JSON tags to chart object Go capitalizes field names by default. Signed-off-by: Matthew Fisher --- pkg/chart/chart.go | 12 ++++++------ pkg/chart/file.go | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/chart/chart.go b/pkg/chart/chart.go index f36cf8236..2b667d456 100644 --- a/pkg/chart/chart.go +++ b/pkg/chart/chart.go @@ -27,18 +27,18 @@ const APIVersionV2 = "v2" // optionally parameterizable templates, and zero or more charts (dependencies). type Chart struct { // Metadata is the contents of the Chartfile. - Metadata *Metadata + Metadata *Metadata `json:"metadata"` // LocK is the contents of Chart.lock. - Lock *Lock + Lock *Lock `json:"lock"` // Templates for this chart. - Templates []*File + Templates []*File `json:"templates"` // Values are default config for this template. - Values map[string]interface{} + Values map[string]interface{} `json:"values"` // Schema is an optional JSON schema for imposing structure on Values - Schema []byte + Schema []byte `json:"schema"` // Files are miscellaneous files in a chart archive, // e.g. README, LICENSE, etc. - Files []*File + Files []*File `json:"files"` parent *Chart dependencies []*Chart diff --git a/pkg/chart/file.go b/pkg/chart/file.go index 45f64efe8..9dd7c08d5 100644 --- a/pkg/chart/file.go +++ b/pkg/chart/file.go @@ -21,7 +21,7 @@ package chart // base directory. type File struct { // Name is the path-like name of the template. - Name string + Name string `json:"name"` // Data is the template as byte data. - Data []byte + Data []byte `json:"data"` }