MCPcopy Index your code
hub / github.com/belak/gitdir / ParseUserConfig

Function ParseUserConfig

models/user_config.go:24–33  ·  view source on GitHub ↗

ParseUserConfig will return an UserConfig parsed from the given data. No additional validation is done.

(data []byte)

Source from the content-addressed store, hash-verified

22// ParseUserConfig will return an UserConfig parsed from the given data. No
23// additional validation is done.
24func ParseUserConfig(data []byte) (*UserConfig, error) {
25 uc := NewUserConfig()
26
27 err := yaml.Unmarshal(data, uc)
28 if err != nil {
29 return nil, err
30 }
31
32 return uc, nil
33}

Callers 1

loadUserConfigMethod · 0.92

Calls 1

NewUserConfigFunction · 0.85

Tested by

no test coverage detected