fix these

This commit is contained in:
David Newhall II 2019-08-25 03:23:36 -07:00
parent 934e7cdd75
commit 976bc9f72c
1 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,12 @@ func NewUnifi(config *Config) (*Unifi, error) {
if err != nil {
return nil, err
}
if config.ErrorLog == nil {
config.ErrorLog = DiscardLogs
}
if config.DebugLog == nil {
config.DebugLog = DiscardLogs
}
config.URL = strings.TrimRight(config.URL, "/")
u := &Unifi{Config: config,
Client: &http.Client{