fix go version check (#7562)

This commit is contained in:
Steven Soroka
2020-05-26 16:11:02 -04:00
committed by GitHub
parent 5345ad529d
commit 2561aac6ef

View File

@@ -486,6 +486,6 @@ func TestProductToken(t *testing.T) {
token := ProductToken()
// Telegraf version depends on the call to SetVersion, it cannot be set
// multiple times and is not thread-safe.
re := regexp.MustCompile(`^Telegraf/[^\s]+ Go/\d+.\d+.\d+$`)
re := regexp.MustCompile(`^Telegraf/[^\s]+ Go/\d+.\d+(.\d+)?$`)
require.True(t, re.MatchString(token), token)
}