security: Bump go and modules
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
e72feaf0f6
commit
9b239a556e
3 changed files with 18 additions and 27 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package base
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -22,7 +21,7 @@ func TestIncludeFilter(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(fmt.Sprintf(tc.name), func(t *testing.T) {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
f := NewIncludeFilter(tc.patterns)
|
||||
|
||||
if got := f.Include(tc.value); got != tc.wanted {
|
||||
|
|
@ -49,7 +48,7 @@ func TestIncludeFilterRegex(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(fmt.Sprintf(tc.name), func(t *testing.T) {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
compiledRegex, err := regexp.Compile(tc.regex)
|
||||
if err != nil {
|
||||
t.Fatalf("Regex '%s' doesn't compile: %v", tc.regex, err)
|
||||
|
|
@ -81,7 +80,7 @@ func TestExcludeFilter(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(fmt.Sprintf(tc.name), func(t *testing.T) {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
f := NewExcludeFilter(tc.patterns)
|
||||
if got := f.Include(tc.value); got != tc.wanted {
|
||||
t.Errorf("Included must be %t for patterns '%s'", tc.wanted, tc.patterns)
|
||||
|
|
@ -107,7 +106,7 @@ func TestExcludeFilterRegex(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(fmt.Sprintf(tc.name), func(t *testing.T) {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
compiledRegex, err := regexp.Compile(tc.regex)
|
||||
if err != nil {
|
||||
t.Fatalf("Regex '%s' doesn't compile: %v", tc.regex, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue