From 78566c3adec1f572c958d68a1a8647f10198fd84 Mon Sep 17 00:00:00 2001 From: Benji Visser Date: Fri, 10 Nov 2023 08:24:59 -0800 Subject: [PATCH] update lookahead default value (#229) Signed-off-by: Benji Visser --- cmd/xeol/cli/options/xeol.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/cmd/xeol/cli/options/xeol.go b/cmd/xeol/cli/options/xeol.go index 6046710a..3cc89889 100644 --- a/cmd/xeol/cli/options/xeol.go +++ b/cmd/xeol/cli/options/xeol.go @@ -41,11 +41,18 @@ var _ interface { } = (*Xeol)(nil) func DefaultXeol(id clio.Identification) *Xeol { + project, commit := getDefaultProjectNameAndCommit() + config := &Xeol{ Search: defaultSearch(source.SquashedScope), DB: DefaultDatabase(id), Match: defaultMatchConfig(), CheckForAppUpdate: true, + Lookahead: "30d", + FailOnEolFound: false, + ProjectName: project, + CommitHash: commit, + ImagePath: "Dockerfile", } return config } @@ -142,16 +149,6 @@ func (o *Xeol) parseLookaheadOption() (err error) { return nil } -func (o *Xeol) loadDefaltValues() { - project, commit := getDefaultProjectNameAndCommit() - o.FailOnEolFound = false - o.Lookahead = "30d" - o.ProjectName = project - o.CommitHash = commit - o.ImagePath = "Dockerfile" -} - func (o *Xeol) PostLoad() error { - o.loadDefaltValues() return o.parseLookaheadOption() }