@@ -30,7 +30,7 @@ type Checkup struct {
3030 // Useful if wanting to perform distributed check
3131 // "at the same time" even if they might actually
3232 // be a few milliseconds or seconds apart.
33- Timestamp time.Time `json:"timestamp,omitempty "`
33+ Timestamp time.Time `json:"timestamp"`
3434
3535 // Storage is the storage mechanism for saving the
3636 // results of checks. Required if calling Store().
@@ -148,7 +148,7 @@ func (c Checkup) MarshalJSON() ([]byte, error) {
148148 // handling; unfortunately this has to mimic c's definition.
149149 easy := struct {
150150 ConcurrentChecks int `json:"concurrent_checks,omitempty"`
151- Timestamp time.Time `json:"timestamp,omitempty "`
151+ Timestamp time.Time `json:"timestamp"`
152152 }{
153153 ConcurrentChecks : c .ConcurrentChecks ,
154154 Timestamp : c .Timestamp ,
@@ -175,7 +175,7 @@ func (c Checkup) MarshalJSON() ([]byte, error) {
175175 if err != nil {
176176 return result , err
177177 }
178- chb = [] byte ( fmt .Sprintf ( `{"type":"%s",%s` , ch .Type (), string (chb [1 :]) ))
178+ chb = fmt .Appendf ( nil , `{"type":"%s",%s` , ch .Type (), string (chb [1 :]))
179179 checkers = append (checkers , chb )
180180 }
181181
@@ -192,7 +192,7 @@ func (c Checkup) MarshalJSON() ([]byte, error) {
192192 if err != nil {
193193 return result , err
194194 }
195- sb = [] byte ( fmt .Sprintf ( `{"type":"%s",%s` , c .Storage .Type (), string (sb [1 :]) ))
195+ sb = fmt .Appendf ( nil , `{"type":"%s",%s` , c .Storage .Type (), string (sb [1 :]))
196196 wrap ("storage" , sb )
197197 }
198198
@@ -205,7 +205,7 @@ func (c Checkup) MarshalJSON() ([]byte, error) {
205205 return result , err
206206 }
207207
208- chb = [] byte ( fmt .Sprintf ( `{"type":"%s",%s` , ch .Type (), string (chb [1 :]) ))
208+ chb = fmt .Appendf ( nil , `{"type":"%s",%s` , ch .Type (), string (chb [1 :]))
209209 checkers = append (checkers , chb )
210210 }
211211
0 commit comments