From abd272635edc268f45819753be6f4ba8517647c4 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Tue, 8 Oct 2024 16:55:02 -0700 Subject: [PATCH] Move util func to utils --- restic.go | 10 ---------- utils.go | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/restic.go b/restic.go index 7c295e8..ac16d3f 100644 --- a/restic.go +++ b/restic.go @@ -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) diff --git a/utils.go b/utils.go index f4d9359..4e47747 100644 --- a/utils.go +++ b/utils.go @@ -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{}