chore: don't initialise zero-valued structs
This commit is contained in:
parent
fce66c644c
commit
14693d2267
35 changed files with 72 additions and 68 deletions
|
|
@ -209,10 +209,10 @@ func (cp *ConfigProvider) configureVehicles(conf config) error {
|
|||
}
|
||||
|
||||
// ensure vehicle config has title
|
||||
ccWithTitle := struct {
|
||||
var ccWithTitle struct {
|
||||
Title string
|
||||
Other map[string]interface{} `mapstructure:",remain"`
|
||||
}{}
|
||||
}
|
||||
|
||||
if err := util.DecodeOther(cc.Other, &ccWithTitle); err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -112,11 +112,11 @@ func tronityAuthorize(addr string, oc *oauth2.Config) (*oauth2.Token, error) {
|
|||
}
|
||||
|
||||
func tronityToken(conf config, vehicleConf qualifiedConfig) (*oauth2.Token, error) {
|
||||
cc := struct {
|
||||
var cc struct {
|
||||
Credentials vehicle.ClientCredentials
|
||||
RedirectURI string
|
||||
Other map[string]interface{} `mapstructure:",remain"`
|
||||
}{}
|
||||
}
|
||||
|
||||
if err := util.DecodeOther(vehicleConf.Other, &cc); err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue