github.com/metasources/buildx@v0.0.0-20230418141019-7aa1459cedea/internal/config/golang.go (about) 1 package config 2 3 import "github.com/spf13/viper" 4 5 type golang struct { 6 SearchLocalModCacheLicenses bool `json:"search-local-mod-cache-licenses" yaml:"search-local-mod-cache-licenses" mapstructure:"search-local-mod-cache-licenses"` 7 LocalModCacheDir string `json:"local-mod-cache-dir" yaml:"local-mod-cache-dir" mapstructure:"local-mod-cache-dir"` 8 SearchRemoteLicenses bool `json:"search-remote-licenses" yaml:"search-remote-licenses" mapstructure:"search-remote-licenses"` 9 Proxy string `json:"proxy" yaml:"proxy" mapstructure:"proxy"` 10 NoProxy string `json:"no-proxy" yaml:"no-proxy" mapstructure:"no-proxy"` 11 } 12 13 func (cfg golang) loadDefaultValues(v *viper.Viper) { 14 v.SetDefault("golang.search-local-mod-cache-licenses", false) 15 v.SetDefault("golang.local-mod-cache-dir", "") 16 v.SetDefault("golang.search-remote-licenses", false) 17 v.SetDefault("golang.proxy", "") 18 v.SetDefault("golang.no-proxy", "") 19 }