Skip to content

Commit 52990e3

Browse files
committedMay 27, 2021
satisfy go vet
1 parent 8f2dfbf commit 52990e3

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed
 

‎gmeasure/enum_support.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (es enumSupport) String(e uint) string {
2626
return es.toString[e]
2727
}
2828

29-
func (es enumSupport) UnmarshalJSON(b []byte) (uint, error) {
29+
func (es enumSupport) UnmarshJSON(b []byte) (uint, error) {
3030
var dec string
3131
if err := json.Unmarshal(b, &dec); err != nil {
3232
return 0, err
@@ -35,7 +35,7 @@ func (es enumSupport) UnmarshalJSON(b []byte) (uint, error) {
3535
return out, nil
3636
}
3737

38-
func (es enumSupport) MarshalJSON(e uint) ([]byte, error) {
38+
func (es enumSupport) MarshJSON(e uint) ([]byte, error) {
3939
if e == 0 || e > es.maxEnum {
4040
return json.Marshal(nil)
4141
}

‎gmeasure/measurement.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ var letEnumSupport = newEnumSupport(map[uint]string{uint(MeasurementTypeInvalid)
2222

2323
func (s MeasurementType) String() string { return letEnumSupport.String(uint(s)) }
2424
func (s *MeasurementType) UnmarshalJSON(b []byte) error {
25-
out, err := letEnumSupport.UnmarshalJSON(b)
25+
out, err := letEnumSupport.UnmarshJSON(b)
2626
*s = MeasurementType(out)
2727
return err
2828
}
29-
func (s MeasurementType) MarshalJSON() ([]byte, error) { return letEnumSupport.MarshalJSON(uint(s)) }
29+
func (s MeasurementType) MarshalJSON() ([]byte, error) { return letEnumSupport.MarshJSON(uint(s)) }
3030

3131
/*
3232
Measurement records all captured data for a given measurement. You generally don't make Measurements directly - but you can fetch them from Experiments using Get().

‎gmeasure/rank.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ var rcEnumSupport = newEnumSupport(map[uint]string{uint(LowerMeanIsBetter): "Low
2727

2828
func (s RankingCriteria) String() string { return rcEnumSupport.String(uint(s)) }
2929
func (s *RankingCriteria) UnmarshalJSON(b []byte) error {
30-
out, err := rcEnumSupport.UnmarshalJSON(b)
30+
out, err := rcEnumSupport.UnmarshJSON(b)
3131
*s = RankingCriteria(out)
3232
return err
3333
}
34-
func (s RankingCriteria) MarshalJSON() ([]byte, error) { return rcEnumSupport.MarshalJSON(uint(s)) }
34+
func (s RankingCriteria) MarshalJSON() ([]byte, error) { return rcEnumSupport.MarshJSON(uint(s)) }
3535

3636
/*
3737
Ranking ranks a set of Stats by a specified RankingCritera. Use RankStats to create a Ranking.

‎gmeasure/stats.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ var statEnumSupport = newEnumSupport(map[uint]string{uint(StatInvalid): "INVALID
2525

2626
func (s Stat) String() string { return statEnumSupport.String(uint(s)) }
2727
func (s *Stat) UnmarshalJSON(b []byte) error {
28-
out, err := statEnumSupport.UnmarshalJSON(b)
28+
out, err := statEnumSupport.UnmarshJSON(b)
2929
*s = Stat(out)
3030
return err
3131
}
32-
func (s Stat) MarshalJSON() ([]byte, error) { return statEnumSupport.MarshalJSON(uint(s)) }
32+
func (s Stat) MarshalJSON() ([]byte, error) { return statEnumSupport.MarshJSON(uint(s)) }
3333

3434
type StatsType uint
3535

@@ -43,11 +43,11 @@ var statsTypeEnumSupport = newEnumSupport(map[uint]string{uint(StatsTypeInvalid)
4343

4444
func (s StatsType) String() string { return statsTypeEnumSupport.String(uint(s)) }
4545
func (s *StatsType) UnmarshalJSON(b []byte) error {
46-
out, err := statsTypeEnumSupport.UnmarshalJSON(b)
46+
out, err := statsTypeEnumSupport.UnmarshJSON(b)
4747
*s = StatsType(out)
4848
return err
4949
}
50-
func (s StatsType) MarshalJSON() ([]byte, error) { return statsTypeEnumSupport.MarshalJSON(uint(s)) }
50+
func (s StatsType) MarshalJSON() ([]byte, error) { return statsTypeEnumSupport.MarshJSON(uint(s)) }
5151

5252
/*
5353
Stats records the key statistics for a given measurement. You generally don't make Stats directly - but you can fetch them from Experiments using GetStats() and from Measurements using Stats().

0 commit comments

Comments
 (0)
Please sign in to comment.