mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-09 21:49:39 -05:00
This commit disables the version checker when JSON output (#153)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user