Removed all code related to install (#892)

This commit is contained in:
RoyUP9
2022-03-15 16:41:42 +02:00
committed by GitHub
parent d844d6eb04
commit edbe4ab00b
45 changed files with 307 additions and 1839 deletions

View File

@@ -1,22 +0,0 @@
package utils
import (
"math/rand"
"time"
)
const charset = "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
var seededRand = rand.New(rand.NewSource(time.Now().UnixNano()))
func StringWithCharset(length int, charset string) string {
b := make([]byte, length)
for i := range b {
b[i] = charset[seededRand.Intn(len(charset))]
}
return string(b)
}
func GetRandomString(length int) string {
return StringWithCharset(length, charset)
}

View File

@@ -1,20 +0,0 @@
package utils
import (
"archive/zip"
"bytes"
)
func ZipData(files map[string][]byte) *bytes.Buffer {
// Create a buffer to write our archive to.
buf := new(bytes.Buffer)
// Create a new zip archive.
zipWriter := zip.NewWriter(buf)
defer func() { _ = zipWriter.Close() }()
for fileName, fileBytes := range files {
zipFile, _ := zipWriter.Create(fileName)
_, _ = zipFile.Write(fileBytes)
}
return buf
}