Skip to content

Commit

Permalink
feat(cli): allow users to pass only --start flag
Browse files Browse the repository at this point in the history
Now users can pass only the `--start` flag and the CLI will
automatically pick the end time:
```
$ lacework vuln ctr list --start 2020-08-18T00:00:00Z
```

Closes #192

Signed-off-by: Salim Afiune Maya <[email protected]>
  • Loading branch information
afiune committed Aug 24, 2020
1 parent 6482d8e commit 547dc1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func parseStartAndEndTime(s, e string) (start time.Time, end time.Time, err erro
}

if e == "" {
err = errors.New("when providing a start time, end time should be provided (--end)")
end = time.Now()
return
}
end, err = time.Parse(time.RFC3339, e)
Expand Down

0 comments on commit 547dc1d

Please sign in to comment.