Skip to content

Commit 39b428f

Browse files
committed
linting
1 parent 1ea9a8b commit 39b428f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/clibase/values.go

+4
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ func (s *Struct[T]) String() string {
400400
return string(byt)
401401
}
402402

403+
// nolint:revive
403404
func (s *Struct[T]) MarshalYAML() (interface{}, error) {
404405
var n yaml.Node
405406
err := n.Encode(s.Value)
@@ -409,6 +410,7 @@ func (s *Struct[T]) MarshalYAML() (interface{}, error) {
409410
return n, nil
410411
}
411412

413+
// nolint:revive
412414
func (s *Struct[T]) UnmarshalYAML(n *yaml.Node) error {
413415
// HACK: for compatibility with flags, we use nil slices instead of empty
414416
// slices. In most cases, nil slices and empty slices are treated
@@ -425,10 +427,12 @@ func (s *Struct[T]) Type() string {
425427
return fmt.Sprintf("struct[%T]", s.Value)
426428
}
427429

430+
// nolint:revive
428431
func (s *Struct[T]) MarshalJSON() ([]byte, error) {
429432
return json.Marshal(s.Value)
430433
}
431434

435+
// nolint:revive
432436
func (s *Struct[T]) UnmarshalJSON(b []byte) error {
433437
return json.Unmarshal(b, &s.Value)
434438
}

0 commit comments

Comments
 (0)