mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-25 00:44:18 +02:00
replace & with new()
This commit is contained in:
@@ -113,7 +113,7 @@ type Config struct {
|
||||
}
|
||||
|
||||
func NewConfig() *Config {
|
||||
return &Config{Clusters: map[string]*Cluster{}}
|
||||
return new(Config{Clusters: map[string]*Cluster{}})
|
||||
}
|
||||
|
||||
func getDefaultPath() string {
|
||||
@@ -216,7 +216,7 @@ func (conf *Config) LoadConfig() error {
|
||||
return fmt.Errorf("failed to read config file: %w", err)
|
||||
}
|
||||
|
||||
newconf := &Config{}
|
||||
newconf := new(Config{})
|
||||
|
||||
err = yaml.Unmarshal(data, newconf)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user