5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-14 03:20:28 +00:00

Fix substitution

This commit is contained in:
Neil Alexander 2018-05-23 18:53:44 +01:00
parent 1fd53bcb7d
commit 8456b2e1bc
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -160,14 +160,14 @@ func main() {
"AllowedBoxPubs": "AllowedEncryptionPublicKeys", "AllowedBoxPubs": "AllowedEncryptionPublicKeys",
} }
for from, to := range changes { for from, to := range changes {
if val, ok := dat[from]; ok { if _, ok := dat[from]; ok {
if val == "" { if to == "" {
if !*normaliseconf { if !*normaliseconf {
log.Println("Warning: Deprecated config option", from, " - please remove") log.Println("Warning: Deprecated config option", from, "- please remove")
} }
} else { } else {
if !*normaliseconf { if !*normaliseconf {
log.Println("Warning: Deprecated config option", from, " - please rename to", to) log.Println("Warning: Deprecated config option", from, "- please rename to", to)
} }
if _, ok := dat[to]; !ok { if _, ok := dat[to]; !ok {
dat[to] = dat[from] dat[to] = dat[from]