()
| 58 | } |
| 59 | |
| 60 | func (s Sample) String() string { |
| 61 | if s.Histogram != nil { |
| 62 | return fmt.Sprintf("%s => %s", s.Metric, SampleHistogramPair{ |
| 63 | Timestamp: s.Timestamp, |
| 64 | Histogram: s.Histogram, |
| 65 | }) |
| 66 | } |
| 67 | return fmt.Sprintf("%s => %s", s.Metric, SamplePair{ |
| 68 | Timestamp: s.Timestamp, |
| 69 | Value: s.Value, |
| 70 | }) |
| 71 | } |
| 72 | |
| 73 | // MarshalJSON implements json.Marshaler. |
| 74 | func (s Sample) MarshalJSON() ([]byte, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected