chore: switch to encryptor module

This commit is contained in:
Jonas Kaninda
2024-10-13 14:20:43 +02:00
parent d4319b70c0
commit 5a74e3f904
6 changed files with 50 additions and 188 deletions

View File

@@ -14,6 +14,7 @@ import (
"os"
"os/exec"
"path/filepath"
"strings"
"time"
)
@@ -233,3 +234,9 @@ func checkConfigFile(filePath string) (string, error) {
// Return an error if neither file exists
return "", fmt.Errorf("no config file found")
}
func RemoveLastExtension(filename string) string {
if idx := strings.LastIndex(filename, "."); idx != -1 {
return filename[:idx]
}
return filename
}