MCPcopy
hub / github.com/jpillora/chisel / DecodeConfig

Function DecodeConfig

share/settings/config.go:13–20  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

11}
12
13func DecodeConfig(b []byte) (*Config, error) {
14 c := &Config{}
15 err := json.Unmarshal(b, c)
16 if err != nil {
17 return nil, fmt.Errorf("Invalid JSON config")
18 }
19 return c, nil
20}
21
22func EncodeConfig(c Config) []byte {
23 //Config doesn't have types that can fail to marshal

Callers 1

handleWebsocketMethod · 0.92

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…