try protobuf

This commit is contained in:
Darien Raymond committed 2016-08-25 21:55:49 +02:00
1 parent 04d956462c
commit bbca180dba
20 files changed
+216 -51

No files matched your search

+3 -3
View File
@@ -10,9 +10,9 @@ import (
)
// UnmarshalJSON implements json.Unmarshaler
func (this *Config) UnmarshalJSON(data []byte) error {
func (this *ServerConfig) UnmarshalJSON(data []byte) error {
type JsonConfig struct {
Timeout int `json:"timeout"`
Timeout uint32 `json:"timeout"`
}
jsonConfig := new(JsonConfig)
if err := json.Unmarshal(data, jsonConfig); err != nil {
@@ -24,5 +24,5 @@ func (this *Config) UnmarshalJSON(data []byte) error {
}
func init() {
registry.RegisterInboundConfig("http", func() interface{} { return new(Config) })
registry.RegisterInboundConfig("http", func() interface{} { return new(ServerConfig) })
}