diff --git a/config/config.go b/config/config.go index 02016a9..7ccfd3a 100644 --- a/config/config.go +++ b/config/config.go @@ -40,6 +40,33 @@ func (c *Config) Merge(other *Config) error { if other == nil { return nil } + if other.Server { + c.Server = other.Server + } + if len(other.Ip) > 0 { + c.Ip = other.Ip + } + if len(other.Port) > 0 { + c.Port = other.Port + } + if len(other.Port) > 0 { + c.Port = other.Port + } + if len(other.MongoHost) > 0 { + c.MongoHost = other.MongoHost + } + if len(other.MongoDB) > 0 { + c.MongoDB = other.MongoDB + } + if len(other.MongoUsername) > 0 { + c.MongoUsername = other.MongoUsername + } + if len(other.MongoPassword) > 0 { + c.MongoPassword = other.MongoPassword + } + if len(other.RemoteHost) > 0 { + c.RemoteHost = other.RemoteHost + } return nil } diff --git a/imgsrv.go b/imgsrv.go index 211975c..0b53075 100644 --- a/imgsrv.go +++ b/imgsrv.go @@ -86,7 +86,7 @@ func main() { } else { log.Println("WARN: you didn't provide any keywords :-(") } - url, err := url.Parse(DefaultConfig.RemoteHost + "/v/" + queryParams) + url, err := url.Parse(DefaultConfig.RemoteHost + "/f/" + queryParams) if err != nil { log.Println(err) return