Skip to content

Commit

Permalink
use iota the proper way
Browse files Browse the repository at this point in the history
  • Loading branch information
jreisinger committed Jun 6, 2024
1 parent 5318ede commit d38fd0e
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions checkip.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,11 @@ const (
)

// Type is the type of a Check.
type Type int32
type Type int

// String returns the name of the Check type: Info, Sec or InfoSec.
// String returns the name of the Check type.
func (t Type) String() string {
switch t {
case TypeInfo:
return "Info"
case TypeSec:
return "Sec"
case TypeInfoSec:
return "InfoSec"
default:
return "Unknown check type"
}
return [...]string{"Info", "Sec", "InfoSec"}[t]
}

// Check provides generic and/or security information about an IP address.
Expand Down

0 comments on commit d38fd0e

Please sign in to comment.