-
Notifications
You must be signed in to change notification settings - Fork 3
/
structs.go
44 lines (36 loc) · 785 Bytes
/
structs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package unittest
// StructRef ...
//go:generate go run ../../../newc
type StructRef struct {
Debug bool
}
// StructValue ...
//go:generate go run ../../../newc --value
type StructValue struct {
Debug bool
}
// StructWithInit ...
//go:generate go run ../../../newc --init
type StructWithInit struct {
Debug bool
}
func (s *StructWithInit) init() {
s.Debug = true
}
// StructValueWithInit ...
//go:generate go run ../../../newc --value --init
type StructValueWithInit struct {
Debug bool
}
func (s *StructValueWithInit) init() {
s.Debug = true
}
// Skipeed ...
//go:generate go run ../../../newc --value --init
type Skipeed struct {
Msg string `bson:"msg" json:"msg"`
Status int `bson:"status" json:"status" newc:"-"`
}
func (e *Skipeed) init() {
e.Status = 403
}