Skip print statement if PIHolePassword

Resolves eko/pihole-exporter#31
This commit is contained in:
Sidd Shah 2020-04-04 14:59:31 -04:00
parent 045639e0ee
commit 54942ee26d

View File

@ -61,7 +61,10 @@ func (c Config) show() {
valueField := val.Field(i) valueField := val.Field(i)
typeField := val.Type().Field(i) typeField := val.Type().Field(i)
log.Println(fmt.Sprintf("%s : %v", typeField.Name, valueField.Interface())) // Do not print password
if typeField.Name != "PIHolePassword" {
log.Println(fmt.Sprintf("%s : %v", typeField.Name, valueField.Interface()))
}
} }
log.Println("------------------------------------") log.Println("------------------------------------")
} }