From 7dfa85eb027fc27ff858e73f1a1ff5fd5e51a89a Mon Sep 17 00:00:00 2001
From: rsiddharth <s@ricketyspace.net>
Date: Sat, 30 Jan 2021 13:56:57 -0500
Subject: lib: stripSpaceChars -> StripSpaceChars

---
 lib/b64.go | 2 +-
 lib/str.go | 2 +-
 lib/web.go | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'lib')

diff --git a/lib/b64.go b/lib/b64.go
index f8a8de8..67f3528 100644
--- a/lib/b64.go
+++ b/lib/b64.go
@@ -20,7 +20,7 @@ func HexToBase64(hex string) string {
 }
 
 func Base64ToBytes(enc string) []byte {
-	enc = stripSpaceChars(enc)
+	enc = StripSpaceChars(enc)
 
 	l := len(enc)
 	bs := make([]byte, 3*(l/4))
diff --git a/lib/str.go b/lib/str.go
index 98b16e9..6ba9507 100644
--- a/lib/str.go
+++ b/lib/str.go
@@ -42,7 +42,7 @@ func BytesToStr(bs []byte) string {
 }
 
 // Strip space and newline characters from string.
-func stripSpaceChars(s string) string {
+func StripSpaceChars(s string) string {
 	ss := ""
 	for i := 0; i < len(s); i++ {
 		if s[i] == ' ' {
diff --git a/lib/web.go b/lib/web.go
index fbdd19d..191d2f2 100644
--- a/lib/web.go
+++ b/lib/web.go
@@ -32,7 +32,7 @@ func WebParseKeyValue(encoded string) map[string]string {
 	kvs := StrSplitAt('&', encoded)
 	for i := 0; i < len(kvs); i++ {
 		kv := StrSplitAt('=', kvs[i])
-		m[stripSpaceChars(kv[0])] = kv[1]
+		m[StripSpaceChars(kv[0])] = kv[1]
 	}
 	return m
 }
-- 
cgit v1.2.3