diff --git a/x-pack/filebeat/input/awss3/metrics.go b/x-pack/filebeat/input/awss3/metrics.go index fe519a862c92..74ac2d14a9a2 100644 --- a/x-pack/filebeat/input/awss3/metrics.go +++ b/x-pack/filebeat/input/awss3/metrics.go @@ -36,7 +36,7 @@ func init() { // currentTime returns the current time. This exists to allow unit tests // simulate the passage of time. func currentTime() time.Time { - clock := clockValue.Load().(clock) + clock, _ := clockValue.Load().(clock) return clock.Now() }