1
0
mirror of https://github.com/mgechev/revive.git synced 2025-02-15 13:53:15 +02:00
revive/test/struct-tag_test.go
2023-03-14 16:16:12 -07:00

20 lines
432 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: []interface{}{"json,inline,outline", "bson,gnu"},
})
}