Merge branch 'main' into better-pak-management
This commit is contained in:
commit
cc3e8705bd
2 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue