Skip to content

Commit

Permalink
make json string unexported
Browse files Browse the repository at this point in the history
  • Loading branch information
pocockn committed Jul 19, 2022
1 parent 1baceb3 commit d678d3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ioctl/newcmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (c *info) get(arg string) (string, error) {
if c.readConfig.DefaultAccount.AddressOrAlias == "" {
return "", config.ErrConfigDefaultAccountNotSet
}
return JSONString(c.readConfig.DefaultAccount), nil
return jsonString(c.readConfig.DefaultAccount), nil
case "explorer":
return c.readConfig.Explorer, nil
case "language":
Expand All @@ -155,7 +155,7 @@ func (c *info) get(arg string) (string, error) {
case "analyserEndpoint":
return c.readConfig.AnalyserEndpoint, nil
case "all":
return JSONString(c.readConfig), nil
return jsonString(c.readConfig), nil
default:
return "", config.ErrConfigNotMatch
}
Expand Down Expand Up @@ -203,8 +203,8 @@ func (c *info) loadConfig() error {
return nil
}

// JSONString returns json string for message
func JSONString(out interface{}) string {
// jsonString returns json string for message
func jsonString(out interface{}) string {
byteAsJSON, err := json.MarshalIndent(out, "", " ")
if err != nil {
log.Panic(err)
Expand Down

0 comments on commit d678d3d

Please sign in to comment.