From 779684d2af2a525ecbf174f7625c8971fe78bb51 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Sun, 10 Jan 2021 16:22:59 -0800 Subject: [PATCH] Add api package (#16) Signed-off-by: Tamal Saha --- types.go => api/types.go | 2 +- main.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) rename types.go => api/types.go (99%) diff --git a/types.go b/api/types.go similarity index 99% rename from types.go rename to api/types.go index 66849c2..39712dc 100644 --- a/types.go +++ b/api/types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package api type DocInfo struct { Project ProjectInfo `json:"project"` diff --git a/main.go b/main.go index 44b784a..0d1fd43 100644 --- a/main.go +++ b/main.go @@ -21,6 +21,7 @@ import ( "fmt" "io" "io/ioutil" + "kubepack.dev/chart-doc-gen/api" "os" "text/template" @@ -46,7 +47,7 @@ func main() { panic(err) } reader := y2.NewYAMLOrJSONDecoder(f, 2048) - var doc DocInfo + var doc api.DocInfo err = reader.Decode(&doc) if err != nil && err != io.EOF { panic(err)