add config

This commit is contained in:
Fran Jurmanović
2024-09-30 23:08:06 +02:00
parent 86804e04d2
commit f5a7749ad9
9 changed files with 79 additions and 27 deletions

View File

@@ -52,7 +52,7 @@ func GetMonthFromLocalized(month string) (int, error) {
case "december":
return 12, nil
default:
return 0, fmt.Errorf("Month not recognized %1", month)
return 0, fmt.Errorf("month not recognized %s", month)
}
}
@@ -92,7 +92,7 @@ func RunElevatedCommand(command string, service string) (string, error) {
cmd := exec.Command("powershell", "-nologo", "-noprofile", "-File", "run_sc.ps1", command, service)
output, err := cmd.CombinedOutput()
if err != nil {
log.Panic("error: %v, output: %s", err, string(output))
log.Panicf("error: %v, output: %s", err, string(output))
return "", fmt.Errorf("error: %v, output: %s", err, string(output))
}
return string(output), nil