Move util func to utils

This commit is contained in:
IamTheFij 2024-10-08 16:55:02 -07:00
parent 2229437a7f
commit abd272635e
2 changed files with 10 additions and 10 deletions

View File

@ -16,16 +16,6 @@ var (
ErrRepoNotFound = errors.Join(errors.New("repository not found or uninitialized"), ErrRestic)
)
func lineIn(needle string, haystack []string) bool {
for _, line := range haystack {
if line == needle {
return true
}
}
return false
}
func maybeAddArgString(args []string, name, value string) []string {
if value != "" {
return append(args, name, value)

View File

@ -2,6 +2,16 @@ package main
import "fmt"
func lineIn(needle string, haystack []string) bool {
for _, line := range haystack {
if line == needle {
return true
}
}
return false
}
func MergeEnvMap(parent, child map[string]string) map[string]string {
result := map[string]string{}