value test works
This commit is contained in:
@@ -68,3 +68,10 @@ func (c Conf) EncodeJSON(w io.Writer) error {
|
||||
enc.SetIndent("", " ")
|
||||
return enc.Encode(c)
|
||||
}
|
||||
|
||||
// DecodeJSON writes the configuration from the reader into
|
||||
// the pointer of the conf
|
||||
func (c *Conf) DecodeJSON(r io.Reader) error {
|
||||
dec := json.NewDecoder(r)
|
||||
return dec.Decode(c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user