github.com/haalcala/mattermost-server-change-repo@v0.0.0-20210713015153-16753fbeee5f/config/unmarshal.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See LICENSE.txt for license information. 3 4 package config 5 6 import ( 7 "encoding/json" 8 9 "github.com/mattermost/mattermost-server/v5/model" 10 ) 11 12 // marshalConfig converts the given configuration into JSON bytes for persistence. 13 func marshalConfig(cfg *model.Config) ([]byte, error) { 14 return json.MarshalIndent(cfg, "", " ") 15 }