Skip to content

Commit

Permalink
update lookahead default value (#229)
Browse files Browse the repository at this point in the history
Signed-off-by: Benji Visser <[email protected]>
  • Loading branch information
noqcks authored Nov 10, 2023
1 parent 5f97a3d commit 78566c3
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions cmd/xeol/cli/options/xeol.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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()
}

0 comments on commit 78566c3

Please sign in to comment.