From fb7e711cd95abaaa8d3adcc898b165a46026c5e7 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Fri, 27 Oct 2023 13:39:11 -0700 Subject: [PATCH] initial commits --- encodeuint32.go => enc/runes/encodeuint32.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) rename encodeuint32.go => enc/runes/encodeuint32.go (64%) diff --git a/encodeuint32.go b/enc/runes/encodeuint32.go similarity index 64% rename from encodeuint32.go rename to enc/runes/encodeuint32.go index f3c397c..a571dc5 100644 --- a/encodeuint32.go +++ b/enc/runes/encodeuint32.go @@ -1,15 +1,14 @@ -package hexadeca +package hexadecarunes import ( - "sourcecode.social/reiver/go-hexadeca/enc/runes" "sourcecode.social/reiver/go-hexadeca/symbols/rune" ) func EncodeUint32(value uint32, symbolFunc func(byte)rune) (r7 rune, r6 rune, r5 rune, r4 rune, r3 rune, r2 rune, r1 rune, r0 rune) { - r7, r6 = hexadecarunes.EncodeByte(byte(0x000000ff & (value >> (8 * 3))), symbolFunc) - r5, r4 = hexadecarunes.EncodeByte(byte(0x000000ff & (value >> (8 * 2))), symbolFunc) - r3, r2 = hexadecarunes.EncodeByte(byte(0x000000ff & (value >> (8 ))), symbolFunc) - r1, r0 = hexadecarunes.EncodeByte(byte(0x000000ff & value ), symbolFunc) + r7, r6 = EncodeByte(byte(0x000000ff & (value >> (8 * 3))), symbolFunc) + r5, r4 = EncodeByte(byte(0x000000ff & (value >> (8 * 2))), symbolFunc) + r3, r2 = EncodeByte(byte(0x000000ff & (value >> (8 ))), symbolFunc) + r1, r0 = EncodeByte(byte(0x000000ff & value ), symbolFunc) return }