Skip to content

Commit ce936d7

Browse files
committed
externalize json
Signed-off-by: Ashish Tiwari <[email protected]>
1 parent 35d1027 commit ce936d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build/config.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package build
22

33
import (
4+
"encoding/json"
45
"fmt"
6+
"io"
57
"log"
68
"os"
79
"path/filepath"
@@ -70,6 +72,9 @@ func init() {
7072
fmt.Println(err.Error())
7173
}
7274
}()
75+
byt, _ := io.ReadAll(f)
76+
77+
_ = json.Unmarshal(byt, &meshmodelmetadata)
7378
WorkloadPath = filepath.Join(wd, "templates", "oam", "workloads")
7479
MeshModelPath = filepath.Join(wd, "templates", "meshmodel", "components")
7580
allVersions, _ := utils.GetLatestReleaseTagsSorted("hashicorp", "consul-k8s")

0 commit comments

Comments
 (0)