(b []byte)
| 11 | } |
| 12 | |
| 13 | func 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 | |
| 22 | func EncodeConfig(c Config) []byte { |
| 23 | //Config doesn't have types that can fail to marshal |
no test coverage detected
searching dependent graphs…