Skip to content

Commit 7456005

Browse files
refactor: replace interface{} with any (Go 1.18+) (#2021)
Signed-off-by: MD-Mushfiqur123 <mushfiqur@users.noreply.github.com> Co-authored-by: MD-Mushfiqur123 <mushfiqur@users.noreply.github.com>
1 parent 6601282 commit 7456005

12 files changed

Lines changed: 133 additions & 133 deletions

File tree

api/prometheus/v1/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ type RuleGroup struct {
592592
// default:
593593
// fmt.Printf("unknown rule type %s", v)
594594
// }
595-
type Rules []interface{}
595+
type Rules []any
596596

597597
// AlertingRule models a alerting rule.
598598
type AlertingRule struct {
@@ -672,7 +672,7 @@ type Metadata struct {
672672
// queryResult contains result data for a query.
673673
type queryResult struct {
674674
Type model.ValueType `json:"resultType"`
675-
Result interface{} `json:"result"`
675+
Result any `json:"result"`
676676

677677
// The decoded value.
678678
v model.Value

0 commit comments

Comments
 (0)