continue working on config and default parsing
This commit is contained in:
parent
4d1b18fd12
commit
c6c801e248
8 changed files with 183 additions and 109 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue