From e8887ee54ef965fecbcde7ead3d0ffb897003414 Mon Sep 17 00:00:00 2001 From: eredotpkfr Date: Mon, 27 Sep 2021 14:35:06 +0300 Subject: [PATCH] fix: gofmt fixes --- internal/utilities/utilities.go | 12 ++++++------ ip.go | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/utilities/utilities.go b/internal/utilities/utilities.go index e79f156..67e9a9d 100644 --- a/internal/utilities/utilities.go +++ b/internal/utilities/utilities.go @@ -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. diff --git a/ip.go b/ip.go index c9aaeb3..7ad2683 100644 --- a/ip.go +++ b/ip.go @@ -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