feat(logger): Add a Fatal logger

This commit is contained in:
2026-03-08 22:38:03 +01:00
parent 89e331069e
commit feff997aba
15 changed files with 145 additions and 39 deletions

View File

@@ -4,7 +4,6 @@ import (
"bytes"
"errors"
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
@@ -596,7 +595,7 @@ func callHelmUpdate(config ConvertOptions) {
func removeNewlinesInsideBrackets(values []byte) []byte {
re, err := regexp.Compile(`(?s)\{\{(.*?)\}\}`)
if err != nil {
log.Fatal(err)
logger.Fatal(err)
}
return re.ReplaceAllFunc(values, func(b []byte) []byte {
// get the first match
@@ -635,7 +634,7 @@ func writeContent(path string, content []byte) {
defer f.Close()
defer func() {
if _, err := f.Write(content); err != nil {
log.Fatal(err)
logger.Fatal(err)
}
}()
}