diff options
author | Alex Auvolat <alex@adnab.me> | 2020-11-13 12:55:32 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-11-13 12:55:32 +0100 |
commit | e4b5c67be0594575ef1f2ea729012ea5ad030a6a (patch) | |
tree | e7231e793b052800702efa379d0c30a0ed8f1d95 /main.go | |
parent | 4367e4a232938b03fb371ae2ee854458a5802fda (diff) | |
download | bottin-e4b5c67be0594575ef1f2ea729012ea5ad030a6a.tar.gz bottin-e4b5c67be0594575ef1f2ea729012ea5ad030a6a.zip |
Style changes
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -298,7 +298,7 @@ func (server *Server) init() error { } base_attributes[suffix_dn[0].Type] = []string{suffix_dn[0].Value} - err = server.addElements(server.config.Suffix, base_attributes) + err = server.putAttributes(server.config.Suffix, base_attributes) if err != nil { return err } @@ -324,7 +324,7 @@ func (server *Server) init() error { ATTR_ENTRYUUID: []string{genUuid()}, } - err = server.addElements(admin_dn, admin_attributes) + err = server.putAttributes(admin_dn, admin_attributes) if err != nil { return err } @@ -338,7 +338,7 @@ func (server *Server) init() error { return nil } -func (server *Server) addElements(dn string, attrs Entry) error { +func (server *Server) putAttributes(dn string, attrs Entry) error { prefix, err := dnToConsul(dn) if err != nil { return err @@ -364,7 +364,7 @@ func (server *Server) addElements(dn string, attrs Entry) error { return err } } else { - json, err := json.Marshal(values) + json, err := json.MarshalIndent(values, "", " ") if err != nil { return err } |