move auth to auth

This commit is contained in:
2024-12-22 21:33:46 +01:00
parent 877557febe
commit 3c601caf02
21 changed files with 279 additions and 265 deletions

27
pkg/fileExists_test.go Normal file
View File

@@ -0,0 +1,27 @@
package pkg
import (
"os"
"testing"
)
func TestFileExists(t *testing.T) {
// Create a temporary file for testing
file, err := os.CreateTemp("", "testfile")
if err != nil {
t.Fatalf("Failed to create temporary file: %v", err)
}
defer os.Remove(file.Name())
// Test with an existing file
exists := FileExists(file.Name())
if !exists {
t.Errorf("FileExists(%q) = false, want true", file.Name())
}
// Test with a non-existing file
exists = FileExists("non_existing_file.txt")
if exists {
t.Errorf("FileExists(%q) = true, want false", "non_existing_file.txt")
}
}