Skip to content

Commit 2c2d4e0

Browse files
committed
Fix bug introduced in v0.3.2
1 parent f2152b5 commit 2c2d4e0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cmd/ax/query.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,14 @@ func querySelectorsToQuery(flags *common.QuerySelectors) common.Query {
223223
}
224224
}
225225

226-
fmt.Printf("Logs before: %s, after: %s\n", before.Format(common.TimeFormat), after.Format(common.TimeFormat))
226+
// before and after could be nil if not provided, but if they were provided
227+
// or `last` flag was provided print range of dates from which logs will be showed.
228+
if after != nil {
229+
fmt.Printf("After: %s\n", after.Format(common.TimeFormat))
230+
}
231+
if before != nil {
232+
fmt.Printf("Before: %s\n", before.Format(common.TimeFormat))
233+
}
227234

228235
return common.Query{
229236
QueryString: strings.Join(flags.QueryString, " "),

0 commit comments

Comments
 (0)