conf getConf returns a copy
This commit is contained in:
parent
543d4c05d3
commit
2dc142a13b
|
@ -95,8 +95,12 @@ func saveConf() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: return copies
|
|
||||||
func GetConf() *Conf {
|
func GetConf() *Conf {
|
||||||
|
var confCopy *Conf = new(Conf)
|
||||||
|
confCopy.Deployments = make(map[string]Deployment)
|
||||||
|
for key, deployment := range(conf.Deployments) {
|
||||||
|
confCopy.Deployments[key] = deployment
|
||||||
|
}
|
||||||
return conf
|
return conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue