| 12345678910111213141516171819202122 | // +build jsonpackage httpimport (	"encoding/json"	"errors")// UnmarshalJSON implements json.Unmarshalerfunc (this *ServerConfig) UnmarshalJSON(data []byte) error {	type JsonConfig struct {		Timeout uint32 `json:"timeout"`	}	jsonConfig := new(JsonConfig)	if err := json.Unmarshal(data, jsonConfig); err != nil {		return errors.New("HTTP: Failed to parse config: " + err.Error())	}	this.Timeout = jsonConfig.Timeout	return nil}
 |