mirror of
https://github.com/zhufuyi/sponge.git
synced 2025-10-06 01:07:08 +08:00
feat: get table info
This commit is contained in:
@@ -30,6 +30,8 @@ type options struct {
|
||||
IsEmbed bool // is gorm.Model embedded
|
||||
IsWebProto bool // true: proto file include router path and swagger info, false: normal proto file without router and swagger
|
||||
IsExtendedAPI bool // true: extended api (9 api), false: basic api (5 api)
|
||||
|
||||
IsCustomTemplate bool // true: custom extend template, false: sponge template
|
||||
}
|
||||
|
||||
var defaultOptions = options{
|
||||
@@ -149,6 +151,13 @@ func WithExtendedAPI() Option {
|
||||
}
|
||||
}
|
||||
|
||||
// WithCustomTemplate set custom template
|
||||
func WithCustomTemplate() Option {
|
||||
return func(o *options) {
|
||||
o.IsCustomTemplate = true
|
||||
}
|
||||
}
|
||||
|
||||
func parseOption(options []Option) options {
|
||||
o := defaultOptions
|
||||
for _, f := range options {
|
||||
|
Reference in New Issue
Block a user