mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 10:04:18 +02:00
adopt latest golang enhancements (#91)
This commit is contained in:
@@ -28,7 +28,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
Version string = `v0.0.26`
|
||||
Version string = `v0.0.27`
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -89,12 +89,13 @@ type Config struct {
|
||||
|
||||
Force bool // ccr follower renew: -f
|
||||
|
||||
DebugHTTP bool // root: --debug-http
|
||||
Separator string // role diff: -s
|
||||
NotDeployed bool // role diff: -n
|
||||
Undefined bool // role diff: -u
|
||||
Diff bool // role diff: -D
|
||||
Hidden bool // ds ls: -H
|
||||
DebugHTTP bool // root: --debug-http
|
||||
DebugGoRoutines bool // root: --debug-goroutines
|
||||
Separator string // role diff: -s
|
||||
NotDeployed bool // role diff: -n
|
||||
Undefined bool // role diff: -u
|
||||
Diff bool // role diff: -D
|
||||
Hidden bool // ds ls: -H
|
||||
|
||||
// rollover
|
||||
MaxAge string
|
||||
@@ -113,7 +114,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 +217,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