File tree 4 files changed +10
-10
lines changed
4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ func (es enumSupport) String(e uint) string {
26
26
return es .toString [e ]
27
27
}
28
28
29
- func (es enumSupport ) UnmarshalJSON (b []byte ) (uint , error ) {
29
+ func (es enumSupport ) UnmarshJSON (b []byte ) (uint , error ) {
30
30
var dec string
31
31
if err := json .Unmarshal (b , & dec ); err != nil {
32
32
return 0 , err
@@ -35,7 +35,7 @@ func (es enumSupport) UnmarshalJSON(b []byte) (uint, error) {
35
35
return out , nil
36
36
}
37
37
38
- func (es enumSupport ) MarshalJSON (e uint ) ([]byte , error ) {
38
+ func (es enumSupport ) MarshJSON (e uint ) ([]byte , error ) {
39
39
if e == 0 || e > es .maxEnum {
40
40
return json .Marshal (nil )
41
41
}
Original file line number Diff line number Diff line change @@ -22,11 +22,11 @@ var letEnumSupport = newEnumSupport(map[uint]string{uint(MeasurementTypeInvalid)
22
22
23
23
func (s MeasurementType ) String () string { return letEnumSupport .String (uint (s )) }
24
24
func (s * MeasurementType ) UnmarshalJSON (b []byte ) error {
25
- out , err := letEnumSupport .UnmarshalJSON (b )
25
+ out , err := letEnumSupport .UnmarshJSON (b )
26
26
* s = MeasurementType (out )
27
27
return err
28
28
}
29
- func (s MeasurementType ) MarshalJSON () ([]byte , error ) { return letEnumSupport .MarshalJSON (uint (s )) }
29
+ func (s MeasurementType ) MarshalJSON () ([]byte , error ) { return letEnumSupport .MarshJSON (uint (s )) }
30
30
31
31
/*
32
32
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().
Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ var rcEnumSupport = newEnumSupport(map[uint]string{uint(LowerMeanIsBetter): "Low
27
27
28
28
func (s RankingCriteria ) String () string { return rcEnumSupport .String (uint (s )) }
29
29
func (s * RankingCriteria ) UnmarshalJSON (b []byte ) error {
30
- out , err := rcEnumSupport .UnmarshalJSON (b )
30
+ out , err := rcEnumSupport .UnmarshJSON (b )
31
31
* s = RankingCriteria (out )
32
32
return err
33
33
}
34
- func (s RankingCriteria ) MarshalJSON () ([]byte , error ) { return rcEnumSupport .MarshalJSON (uint (s )) }
34
+ func (s RankingCriteria ) MarshalJSON () ([]byte , error ) { return rcEnumSupport .MarshJSON (uint (s )) }
35
35
36
36
/*
37
37
Ranking ranks a set of Stats by a specified RankingCritera. Use RankStats to create a Ranking.
Original file line number Diff line number Diff line change @@ -25,11 +25,11 @@ var statEnumSupport = newEnumSupport(map[uint]string{uint(StatInvalid): "INVALID
25
25
26
26
func (s Stat ) String () string { return statEnumSupport .String (uint (s )) }
27
27
func (s * Stat ) UnmarshalJSON (b []byte ) error {
28
- out , err := statEnumSupport .UnmarshalJSON (b )
28
+ out , err := statEnumSupport .UnmarshJSON (b )
29
29
* s = Stat (out )
30
30
return err
31
31
}
32
- func (s Stat ) MarshalJSON () ([]byte , error ) { return statEnumSupport .MarshalJSON (uint (s )) }
32
+ func (s Stat ) MarshalJSON () ([]byte , error ) { return statEnumSupport .MarshJSON (uint (s )) }
33
33
34
34
type StatsType uint
35
35
@@ -43,11 +43,11 @@ var statsTypeEnumSupport = newEnumSupport(map[uint]string{uint(StatsTypeInvalid)
43
43
44
44
func (s StatsType ) String () string { return statsTypeEnumSupport .String (uint (s )) }
45
45
func (s * StatsType ) UnmarshalJSON (b []byte ) error {
46
- out , err := statsTypeEnumSupport .UnmarshalJSON (b )
46
+ out , err := statsTypeEnumSupport .UnmarshJSON (b )
47
47
* s = StatsType (out )
48
48
return err
49
49
}
50
- func (s StatsType ) MarshalJSON () ([]byte , error ) { return statsTypeEnumSupport .MarshalJSON (uint (s )) }
50
+ func (s StatsType ) MarshalJSON () ([]byte , error ) { return statsTypeEnumSupport .MarshJSON (uint (s )) }
51
51
52
52
/*
53
53
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().
You can’t perform that action at this time.
0 commit comments