MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / LoadStartupConfigFromPath

Function LoadStartupConfigFromPath

rest/config_startup.go:223–234  ·  view source on GitHub ↗
(ctx context.Context, path string)

Source from the content-addressed store, hash-verified

221}
222
223func LoadStartupConfigFromPath(ctx context.Context, path string) (*StartupConfig, error) {
224 rc, err := readFromPath(ctx, path, false)
225 if err != nil {
226 return nil, err
227 }
228
229 defer func() { _ = rc.Close() }()
230
231 var sc StartupConfig
232 err = DecodeAndSanitiseStartupConfig(ctx, rc, &sc, true)
233 return &sc, err
234}
235
236// NewEmptyStartupConfig initialises an empty StartupConfig with all *struct fields empty
237func NewEmptyStartupConfig() StartupConfig {

Callers 1

Calls 3

readFromPathFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected