This commit disables the version checker when JSON output (#153)

This commit is contained in:
Juan Font Alonso
2021-10-13 00:18:55 +02:00
parent dd1e425d02
commit 27947c6746
2 changed files with 11 additions and 1 deletions

View File

@@ -262,3 +262,12 @@ func JsonOutput(result interface{}, errResult error, outputFormat string) {
}
fmt.Println(string(j))
}
func HasJsonOutputFlag() bool {
for _, arg := range os.Args {
if arg == "json" || arg == "json-line" {
return true
}
}
return false
}