```go
type NideshopUserLevel struct {
Id int `orm:"column(id);auto"`
Name string `orm:"column(name);size(30)"`
Description string `orm:"column(description);size(255)"`
}
type NideshopUserCoupon struct {
Id int `orm:"column(id);auto"`
CouponId uint8 `orm:"column(coupon_id)"`
CouponNumber string `orm:"column(coupon_number);size(20)"`
UserId uint `orm:"column(user_id)"`
UsedTime uint `orm:"column(used_time)"`
OrderId uint32 `orm:"column(order_id)"`
}
type NideshopUserLevel struct {
Id int `orm:"column(id);auto"`
Name string `orm:"column(name);size(30)"`
Description string `orm:"column(description);size(255)"`
}
```
用 sed 把重复的结构体 NideshopUserLevel {} 去掉,文件内还有未知的重复.
```shell
find *.go |xargs cat|sed -n '/type \w* struct/,/^}/p'|sed '/type/{:a N;/\ntype/!{s/\n/\\n/;ta};P;D}' all_struct.txt | sort -t' ' -k2,2 -u
```
自己搞好,浪费一天...
#1