From b1d92b395322f2164ccfb44b0f7caebbaece6b62 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 22 Apr 2022 16:29:59 +0200 Subject: Refactor: Restructure project - Add an internal folder where all the internal code lives - Make a state.go and state_test.go for the public interface This gives a more clear separation between functions and modules. It also makes this a more typical Go project setup. --- src/util.go | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 src/util.go (limited to 'src/util.go') diff --git a/src/util.go b/src/util.go deleted file mode 100644 index 87340f9..0000000 --- a/src/util.go +++ /dev/null @@ -1,21 +0,0 @@ -package eduvpn - -import ( - "crypto/rand" - "time" -) - -// Creates a random byteslice of `size` -func MakeRandomByteSlice(size int) ([]byte, error) { - byteSlice := make([]byte, size) - _, err := rand.Read(byteSlice) - if err != nil { - return nil, err - } - return byteSlice, nil -} - -func GenerateTimeSeconds() int64 { - current := time.Now() - return current.Unix() -} -- cgit v1.2.3