summaryrefslogtreecommitdiff
path: root/src/util.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-04-22 16:29:59 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-04-22 16:29:59 +0200
commitb1d92b395322f2164ccfb44b0f7caebbaece6b62 (patch)
tree2133e4045b4af4d07a98674b7ae3a234670f0305 /src/util.go
parent3a4ae2942b43923ff98fd2eca8878c3cf145686c (diff)
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.
Diffstat (limited to 'src/util.go')
-rw-r--r--src/util.go21
1 files changed, 0 insertions, 21 deletions
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()
-}