MCPcopy Index your code
hub / github.com/larksuite/cli / SaveMultiAppConfig

Function SaveMultiAppConfig

internal/core/config.go:214–224  ·  view source on GitHub ↗

SaveMultiAppConfig saves config to disk.

(config *MultiAppConfig)

Source from the content-addressed store, hash-verified

212
213// SaveMultiAppConfig saves config to disk.
214func SaveMultiAppConfig(config *MultiAppConfig) error {
215 dir := GetConfigDir()
216 if err := vfs.MkdirAll(dir, 0700); err != nil {
217 return err
218 }
219 data, err := json.MarshalIndent(config, "", " ")
220 if err != nil {
221 return err
222 }
223 return validate.AtomicWrite(GetConfigPath(), append(data, '\n'), 0600)
224}
225
226// RequireConfig loads the single-app config using the default profile resolution.
227func RequireConfig(kc keychain.KeychainAccess) (*CliConfig, error) {

Calls 4

MkdirAllFunction · 0.92
AtomicWriteFunction · 0.92
GetConfigDirFunction · 0.85
GetConfigPathFunction · 0.85