Skip to content

Commit

Permalink
Makes json output mode use an empty array for parameters instead of null
Browse files Browse the repository at this point in the history
  • Loading branch information
tomnomnom committed May 9, 2022
1 parent c8b599c commit 134037e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ type KeyValue struct {
}

func jsonFormat(u *url.URL, _ string) []string {
var parameters []KeyValue
parameters := make([]KeyValue, 0)
for key, vals := range u.Query() {
for _, val := range vals {
parameters = append(parameters, KeyValue{Key: key, Value: val})
Expand Down

0 comments on commit 134037e

Please sign in to comment.