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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -486,6 +486,6 @@ func TestProductToken(t *testing.T) {
token := ProductToken() token := ProductToken()
// Telegraf version depends on the call to SetVersion, it cannot be set // Telegraf version depends on the call to SetVersion, it cannot be set
// multiple times and is not thread-safe. // 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) require.True(t, re.MatchString(token), token)
} }