Add DNS stamps to JSON output

This commit is contained in:
Frank Denis 2019-10-23 23:28:46 +02:00
parent 560577af00
commit e5f3eff760
1 changed files with 2 additions and 0 deletions

View File

@ -191,6 +191,7 @@ type ServerSummary struct {
NoLog bool `json:"nolog"`
NoFilter bool `json:"nofilter"`
Description string `json:"description,omitempty"`
Stamp string `json:"stamp"`
}
func findConfigFile(configFile *string) (string, error) {
@ -547,6 +548,7 @@ func (config *Config) printRegisteredServers(proxy *Proxy, jsonOutput bool) {
NoLog: registeredServer.stamp.Props&stamps.ServerInformalPropertyNoLog != 0,
NoFilter: registeredServer.stamp.Props&stamps.ServerInformalPropertyNoFilter != 0,
Description: registeredServer.description,
Stamp: registeredServer.stamp.String()
}
if jsonOutput {
summary = append(summary, serverSummary)