Codebase list golang-gomega / 52990e3
satisfy go vet Onsi Fakhouri 2 years ago
4 changed file(s) with 10 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
2525 return es.toString[e]
2626 }
2727
28 func (es enumSupport) UnmarshalJSON(b []byte) (uint, error) {
28 func (es enumSupport) UnmarshJSON(b []byte) (uint, error) {
2929 var dec string
3030 if err := json.Unmarshal(b, &dec); err != nil {
3131 return 0, err
3434 return out, nil
3535 }
3636
37 func (es enumSupport) MarshalJSON(e uint) ([]byte, error) {
37 func (es enumSupport) MarshJSON(e uint) ([]byte, error) {
3838 if e == 0 || e > es.maxEnum {
3939 return json.Marshal(nil)
4040 }
2121
2222 func (s MeasurementType) String() string { return letEnumSupport.String(uint(s)) }
2323 func (s *MeasurementType) UnmarshalJSON(b []byte) error {
24 out, err := letEnumSupport.UnmarshalJSON(b)
24 out, err := letEnumSupport.UnmarshJSON(b)
2525 *s = MeasurementType(out)
2626 return err
2727 }
28 func (s MeasurementType) MarshalJSON() ([]byte, error) { return letEnumSupport.MarshalJSON(uint(s)) }
28 func (s MeasurementType) MarshalJSON() ([]byte, error) { return letEnumSupport.MarshJSON(uint(s)) }
2929
3030 /*
3131 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().
2626
2727 func (s RankingCriteria) String() string { return rcEnumSupport.String(uint(s)) }
2828 func (s *RankingCriteria) UnmarshalJSON(b []byte) error {
29 out, err := rcEnumSupport.UnmarshalJSON(b)
29 out, err := rcEnumSupport.UnmarshJSON(b)
3030 *s = RankingCriteria(out)
3131 return err
3232 }
33 func (s RankingCriteria) MarshalJSON() ([]byte, error) { return rcEnumSupport.MarshalJSON(uint(s)) }
33 func (s RankingCriteria) MarshalJSON() ([]byte, error) { return rcEnumSupport.MarshJSON(uint(s)) }
3434
3535 /*
3636 Ranking ranks a set of Stats by a specified RankingCritera. Use RankStats to create a Ranking.
2424
2525 func (s Stat) String() string { return statEnumSupport.String(uint(s)) }
2626 func (s *Stat) UnmarshalJSON(b []byte) error {
27 out, err := statEnumSupport.UnmarshalJSON(b)
27 out, err := statEnumSupport.UnmarshJSON(b)
2828 *s = Stat(out)
2929 return err
3030 }
31 func (s Stat) MarshalJSON() ([]byte, error) { return statEnumSupport.MarshalJSON(uint(s)) }
31 func (s Stat) MarshalJSON() ([]byte, error) { return statEnumSupport.MarshJSON(uint(s)) }
3232
3333 type StatsType uint
3434
4242
4343 func (s StatsType) String() string { return statsTypeEnumSupport.String(uint(s)) }
4444 func (s *StatsType) UnmarshalJSON(b []byte) error {
45 out, err := statsTypeEnumSupport.UnmarshalJSON(b)
45 out, err := statsTypeEnumSupport.UnmarshJSON(b)
4646 *s = StatsType(out)
4747 return err
4848 }
49 func (s StatsType) MarshalJSON() ([]byte, error) { return statsTypeEnumSupport.MarshalJSON(uint(s)) }
49 func (s StatsType) MarshalJSON() ([]byte, error) { return statsTypeEnumSupport.MarshJSON(uint(s)) }
5050
5151 /*
5252 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().