diff --git a/types.go b/types.go index af3651999..e9215519a 100644 --- a/types.go +++ b/types.go @@ -219,7 +219,7 @@ const ( type AttachFlags uint32 // PinType determines whether a map is pinned into a BPFFS. -type PinType int +type PinType uint32 // Valid pin types. // diff --git a/types_string.go b/types_string.go index 5679f2254..e20c37aa4 100644 --- a/types_string.go +++ b/types_string.go @@ -111,7 +111,7 @@ const _PinType_name = "PinNonePinByName" var _PinType_index = [...]uint8{0, 7, 16} func (i PinType) String() string { - if i < 0 || i >= PinType(len(_PinType_index)-1) { + if i >= PinType(len(_PinType_index)-1) { return "PinType(" + strconv.FormatInt(int64(i), 10) + ")" } return _PinType_name[_PinType_index[i]:_PinType_index[i+1]]