github.com/adacta-ru/mattermost-server/v6@v6.0.0/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/adacta-ru/mattermost-server/v6/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  }