Skip to content

Commit 4587bed

Browse files
authored
Merge pull request #4 from MyBlackJay/DEVELOP
fixed docstrings
2 parents 54bc73d + 5523690 commit 4587bed

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

types.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func FormatTimeDuration(d time.Duration) string {
181181
return NewFromTimeDuration(d).String()
182182
}
183183

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
185185
func (d *Duration) UnmarshalJSON(source []byte) error {
186186
value := string(source)
187187

@@ -201,12 +201,12 @@ func (d *Duration) UnmarshalJSON(source []byte) error {
201201
}
202202
}
203203

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
205205
func (d Duration) MarshalJSON() ([]byte, error) {
206206
return []byte("\"" + d.String() + "\""), nil
207207
}
208208

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
210210
func (d *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error {
211211
var str string
212212
if err := unmarshal(&str); err != nil {
@@ -225,7 +225,7 @@ func (d *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error {
225225
}
226226
}
227227

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
229229
func (d Duration) MarshalYAML() (interface{}, error) {
230230
return d.String(), nil
231231
}

0 commit comments

Comments
 (0)