1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-28 08:49:11 +02:00
revive/test/struct-tag_test.go
2023-09-24 08:44:02 +02:00

20 lines
424 B
Go

package test
import (
"testing"
"github.com/mgechev/revive/lint"
"github.com/mgechev/revive/rule"
)
// TestStructTag tests struct-tag rule
func TestStructTag(t *testing.T) {
testRule(t, "struct-tag", &rule.StructTagRule{})
}
func TestStructTagWithUserOptions(t *testing.T) {
testRule(t, "struct-tag-useroptions", &rule.StructTagRule{}, &lint.RuleConfig{
Arguments: []any{"json,inline,outline", "bson,gnu"},
})
}