Skip to content

Commit

Permalink
Merge pull request #39 from giiiiiithub/new
Browse files Browse the repository at this point in the history
jvms.json配置文件pretty化
  • Loading branch information
ystyle committed Feb 26, 2024
2 parents cacbd88 + 03f9786 commit 2054055
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,14 @@ func getJdkVersions() ([]JdkVersion, error) {
}

func startup(c *cli.Context) error {

store.Register(
"json",
func(v interface{}) ([]byte, error) {
return json.MarshalIndent(v, "", " ")
},
json.Unmarshal)

store.Init("jvms")
if err := store.Load("jvms.json", &config); err != nil {
return errors.New("failed to load the config:" + err.Error())
Expand Down

0 comments on commit 2054055

Please sign in to comment.