Skip to content

Commit

Permalink
:Review: Add reason for nolint directive
Browse files Browse the repository at this point in the history
Signed-off-by: Manoranjith <[email protected]>
  • Loading branch information
Manoranjith committed Dec 7, 2021
1 parent 0dc3cca commit 464caf7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/io/serialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ var byteOrder = binary.LittleEndian

// Encode encodes multiple primitive values into a writer.
// All passed values must be copies, not references.
func Encode(writer io.Writer, values ...interface{}) (err error) { //nolint: cyclop
func Encode(writer io.Writer, values ...interface{}) (err error) { //nolint: cyclop // by design,
// encode function has many paths. Hence, we accept a higher complexity here.
for i, value := range values {
switch v := value.(type) {
case bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64:
Expand Down

0 comments on commit 464caf7

Please sign in to comment.