1
0
mirror of https://github.com/mgechev/revive.git synced 2025-03-31 21:55:29 +02:00
revive/test/struct-tag_test.go

20 lines
424 B
Go
Raw Normal View History

2018-07-28 18:07:31 +02:00
package test
import (
"testing"
2023-03-15 00:16:12 +01:00
"github.com/mgechev/revive/lint"
2018-07-28 18:07:31 +02:00
"github.com/mgechev/revive/rule"
)
// TestStructTag tests struct-tag rule
func TestStructTag(t *testing.T) {
testRule(t, "struct-tag", &rule.StructTagRule{})
}
2023-03-15 00:16:12 +01:00
func TestStructTagWithUserOptions(t *testing.T) {
testRule(t, "struct-tag-useroptions", &rule.StructTagRule{}, &lint.RuleConfig{
Arguments: []any{"json,inline,outline", "bson,gnu"},
2023-03-15 00:16:12 +01:00
})
}