@@ -181,7 +181,7 @@ func FormatTimeDuration(d time.Duration) string {
181
181
return NewFromTimeDuration (d ).String ()
182
182
}
183
183
184
- // UnmarshalJSON designed to serialize a string in ISO 8601 duration format in *Duration defined in user code via the json library
184
+ // UnmarshalJSON designed to serialize a string in ISO 8601 duration format to *Duration, defined in user code via the json library
185
185
func (d * Duration ) UnmarshalJSON (source []byte ) error {
186
186
value := string (source )
187
187
@@ -201,12 +201,12 @@ func (d *Duration) UnmarshalJSON(source []byte) error {
201
201
}
202
202
}
203
203
204
- // MarshalJSON designed to deserialize *Duration in a string in ISO 8601 duration format defined in user code via the json library
204
+ // MarshalJSON designed to deserialize *Duration to a string in ISO 8601 duration format, defined in user code via the json library
205
205
func (d Duration ) MarshalJSON () ([]byte , error ) {
206
206
return []byte ("\" " + d .String () + "\" " ), nil
207
207
}
208
208
209
- // UnmarshalYAML designed to deserialize *Duration in a string in ISO 8601 duration format defined in user code via the gopkg.in/yaml.v3 library
209
+ // UnmarshalYAML designed to serialize a string in ISO 8601 duration format to *Duration, defined in user code via the gopkg.in/yaml.v3 library
210
210
func (d * Duration ) UnmarshalYAML (unmarshal func (interface {}) error ) error {
211
211
var str string
212
212
if err := unmarshal (& str ); err != nil {
@@ -225,7 +225,7 @@ func (d *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error {
225
225
}
226
226
}
227
227
228
- // MarshalYAML designed to deserialize *Duration in a string in ISO 8601 duration format defined in user code via the gopkg.in/yaml.v3 library
228
+ // MarshalYAML designed to deserialize *Duration to a string in ISO 8601 duration format, defined in user code via the gopkg.in/yaml.v3 library
229
229
func (d Duration ) MarshalYAML () (interface {}, error ) {
230
230
return d .String (), nil
231
231
}
0 commit comments