working commit

This commit is contained in:
2026-01-26 17:44:54 +02:00
parent f2e33d9ff1
commit 15e4e893b1
18 changed files with 300 additions and 21 deletions
+18
View File
@@ -0,0 +1,18 @@
/*
* Copyright 2019 Oleg Borodin <borodin@unix7.org>
*/
package auxtool
import (
"math/rand"
)
func RandomString(n int) string {
const letters = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
arr := make([]byte, n)
for i := range arr {
arr[i] = letters[rand.Intn(len(letters))]
}
return string(arr)
}
+10
View File
@@ -0,0 +1,10 @@
package auxtool
import (
"time"
)
func TimeNow() string {
return time.Now().Format(time.RFC3339)
}
+11
View File
@@ -0,0 +1,11 @@
package auxuuid
import (
"github.com/google/uuid"
)
const ZeroUUID = "00000000-0000-0000-0000-000000000000"
func NewUUID() string {
return uuid.New().String()
}
+3 -2
View File
@@ -1,9 +1,10 @@
package client
type Client struct {
}
func (cli *Client) FileExists(path string) (bool, error) {
//reqPath = fmt.Sprintf("/v3/api/file/%s", path)
//request, err := http.NewRequest("HEAD", reqPath, nil)
//reqPath = fmt.Sprintf("/v3/api/file/%s", path)
//request, err := http.NewRequest("HEAD", reqPath, nil)
}