Skip to content

Commit

Permalink
fix: gofmt fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eredotpkfr committed Sep 27, 2021
1 parent bca6e4f commit e8887ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions internal/utilities/utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ const big = 0xFFFFFF
// SplitOnce does split given string.
// Returns prefix, suffix, success.
func SplitOnce(targetStr string, sep byte) (prefix, suffix string, ok bool) {
for i := 0; i < len(targetStr); i++ {
if targetStr[i] == sep {
return targetStr[:i], targetStr[i + 1:], true
}
}
return "", "", false
for i := 0; i < len(targetStr); i++ {
if targetStr[i] == sep {
return targetStr[:i], targetStr[i+1:], true
}
}
return "", "", false
}

// Xtoi is Hexadecimal to integer.
Expand Down
4 changes: 2 additions & 2 deletions ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ const (

// 0xFF -> 255
ipv4MaxPart = 0xFF
ipv4Length = 4
ipv4Length = 4

// 0xFFFF -> 65535
ipv6MaxPart = 0xFFFF
ipv6Length = 16
ipv6Length = 16
)

// Ipv4 function for validating IPv4
Expand Down

0 comments on commit e8887ee

Please sign in to comment.