From bc9222564c2fb1ff64f0b81fb332f0c2d8eb09d8 Mon Sep 17 00:00:00 2001 From: Zhang Xin Date: Tue, 17 Dec 2024 07:07:32 +0800 Subject: [PATCH] change default value Signed-off-by: Zhang Xin --- cmd/anonymizer/app/flags.go | 4 ++-- cmd/anonymizer/app/flags_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/anonymizer/app/flags.go b/cmd/anonymizer/app/flags.go index a7acc76b697..f376f4af151 100644 --- a/cmd/anonymizer/app/flags.go +++ b/cmd/anonymizer/app/flags.go @@ -79,12 +79,12 @@ func (o *Options) AddFlags(command *cobra.Command) { command.Flags().Int64Var( &o.StartTime, startTime, - -1, + 0, "The start time of time window for searching trace, timestampe in unix nanoseconds") command.Flags().Int64Var( &o.EndTime, endTime, - -1, + 0, "The end time of time window for searching trace, timestampe in unix nanoseconds") // mark traceid flag as mandatory diff --git a/cmd/anonymizer/app/flags_test.go b/cmd/anonymizer/app/flags_test.go index f6e7feff0b3..08b6bbb8538 100644 --- a/cmd/anonymizer/app/flags_test.go +++ b/cmd/anonymizer/app/flags_test.go @@ -24,8 +24,8 @@ func TestOptionsWithDefaultFlags(t *testing.T) { assert.False(t, o.HashLogs) assert.False(t, o.HashProcess) assert.Equal(t, -1, o.MaxSpansCount) - assert.Equal(t, int64(-1), o.StartTime) - assert.Equal(t, int64(-1), o.EndTime) + assert.Equal(t, int64(0), o.StartTime) + assert.Equal(t, int64(0), o.EndTime) } func TestOptionsWithFlags(t *testing.T) {