From ce936d7d0aadebd7bddc6ffdc3e55f2cc38dc610 Mon Sep 17 00:00:00 2001 From: Ashish Tiwari Date: Mon, 26 Dec 2022 19:37:07 +0530 Subject: [PATCH] externalize json Signed-off-by: Ashish Tiwari --- build/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/config.go b/build/config.go index 7f742f2..8c907e0 100644 --- a/build/config.go +++ b/build/config.go @@ -1,7 +1,9 @@ package build import ( + "encoding/json" "fmt" + "io" "log" "os" "path/filepath" @@ -70,6 +72,9 @@ func init() { fmt.Println(err.Error()) } }() + byt, _ := io.ReadAll(f) + + _ = json.Unmarshal(byt, &meshmodelmetadata) WorkloadPath = filepath.Join(wd, "templates", "oam", "workloads") MeshModelPath = filepath.Join(wd, "templates", "meshmodel", "components") allVersions, _ := utils.GetLatestReleaseTagsSorted("hashicorp", "consul-k8s")