Skip to content

Commit d85f725

Browse files
committed
omit empty data from response
1 parent 6c5ba82 commit d85f725

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prometheus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type PromResponse struct {
3737
Data struct {
3838
ResultType string `json:"resultType"`
3939
Result []PromResult `json:"result"`
40-
} `json:"data"`
40+
} `json:"data,omitempty"`
4141
}
4242

4343
type PromConverter struct {

0 commit comments

Comments
 (0)