Skip to content

Commit d7fc593

Browse files
refactor: 测试用例合并到一个文件中
1 parent 1b34f4b commit d7fc593

File tree

3 files changed

+8
-28
lines changed

3 files changed

+8
-28
lines changed

example/generic_example.go

Lines changed: 0 additions & 28 deletions
This file was deleted.
File renamed without changes.

example/user.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ type Embedded7 struct{}
3838

3939
type Embedded8 struct{}
4040

41+
//go:generate go run ../cmd/optioner/main.go -type GenericExample
42+
type GenericExample[T any, U comparable, V ~int] struct {
43+
A T `opt:"-"`
44+
B U
45+
C V
46+
D string
47+
}
48+
4149
//go:generate go run ../cmd/optioner/main.go -type User
4250
type User struct {
4351
Embedded `opt:"-"`

0 commit comments

Comments
 (0)