From 433c64daf692da215587f31cda85ef2612a10464 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Mon, 31 Aug 2020 20:48:22 -0400 Subject: lib/hex.go: update ByteToHexStr * lib/hex.go (ByteToHexStr): Move around. --- lib/hex.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/hex.go b/lib/hex.go index 0087f33..98f3210 100644 --- a/lib/hex.go +++ b/lib/hex.go @@ -44,16 +44,6 @@ func HexStrToAsciiStr(h string) string { return a } -func ByteToHexStr(b byte) string { - p := DecToHexChar(uint16(b >> 4)) - q := DecToHexChar(uint16(b & 0xf)) - - s := string(p) - s += string(q) - - return s -} - func AsciiStrToHexStr(as string) string { hs := "" if len(as) < 1 { @@ -66,3 +56,13 @@ func AsciiStrToHexStr(as string) string { } return hs } + +func ByteToHexStr(b byte) string { + p := DecToHexChar(uint16(b >> 4)) + q := DecToHexChar(uint16(b & 0xf)) + + s := string(p) + s += string(q) + + return s +} -- cgit v1.2.3