continue working on config and default parsing

This commit is contained in:
Daniel Fichtinger 2024-11-25 16:05:35 -05:00
parent 4d1b18fd12
commit c6c801e248
8 changed files with 183 additions and 109 deletions

View file

@ -1,6 +1,9 @@
package util
import "strings"
import (
"errors"
"strings"
)
func NormalizeContent(content string) string {
var normalized []string
@ -13,3 +16,8 @@ func NormalizeContent(content string) string {
}
return strings.Join(normalized, "\n")
}
// ErrorPrepend returns a new error with a message prepended to the given error.
func ErrorPrepend(m string, err error) error {
return errors.Join(errors.New(m), err)
}