From fc6c54c834584cb666d65918c7a50c189157ac14 Mon Sep 17 00:00:00 2001 From: BroodjeAap Date: Tue, 18 Aug 2020 19:05:57 +0000 Subject: [PATCH] removed some unused functions from util --- util.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/util.go b/util.go index a77e25f..d663ea0 100755 --- a/util.go +++ b/util.go @@ -1,27 +1,12 @@ package main import ( - "crypto/sha256" - "encoding/base64" "log" "os" "path/filepath" "strconv" ) -// URLToBase64 returns the base64 encoding of the URL parameter -func URLToBase64(URL string) string { - h := sha256.New() - h.Write([]byte(URL)) - return base64.URLEncoding.EncodeToString(h.Sum(nil)) -} - -// Base64ToURL returns the string decoded base64 value -func Base64ToURL(value string) string { - decoded, _ := base64.URLEncoding.DecodeString(value) - return string(decoded) -} - // FileExists returns true if path exists func FileExists(path string) bool { _, err := os.Stat(path)