File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,7 @@ func (s *Struct[T]) String() string {
400
400
return string (byt )
401
401
}
402
402
403
+ // nolint:revive
403
404
func (s * Struct [T ]) MarshalYAML () (interface {}, error ) {
404
405
var n yaml.Node
405
406
err := n .Encode (s .Value )
@@ -409,6 +410,7 @@ func (s *Struct[T]) MarshalYAML() (interface{}, error) {
409
410
return n , nil
410
411
}
411
412
413
+ // nolint:revive
412
414
func (s * Struct [T ]) UnmarshalYAML (n * yaml.Node ) error {
413
415
// HACK: for compatibility with flags, we use nil slices instead of empty
414
416
// slices. In most cases, nil slices and empty slices are treated
@@ -425,10 +427,12 @@ func (s *Struct[T]) Type() string {
425
427
return fmt .Sprintf ("struct[%T]" , s .Value )
426
428
}
427
429
430
+ // nolint:revive
428
431
func (s * Struct [T ]) MarshalJSON () ([]byte , error ) {
429
432
return json .Marshal (s .Value )
430
433
}
431
434
435
+ // nolint:revive
432
436
func (s * Struct [T ]) UnmarshalJSON (b []byte ) error {
433
437
return json .Unmarshal (b , & s .Value )
434
438
}
You can’t perform that action at this time.
0 commit comments