Describe the bug
A clear and concise description of what the bug is.
It panics when I use swag i
type Param struct {
SendTime Time `json:"send_time" form:"send_time" gorm:"DEFAULT:NULL"`
}
// Time ...
type Time time.Time
// TimeLayout ...
var TimeLayout = "2006-01-02 15:04:05"
// MarshalJSON ...
func (t Time) MarshalJSON() ([]byte, error) {
return json.Marshal(time.Time(t).Format(TimeLayout))
}
// UnmarshalJSON ...
func (t *Time) UnmarshalJSON(b []byte) error {
var s string
if err := json.Unmarshal(b, &s); err != nil {
return err
}
if s == "" {
return nil
}
tt, err := time.Parse(TimeLayout, s)
if err != nil {
return err
}
*t = Time(tt)
return nil
}
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots

Your swag version
swag version v1.5.0
Your go version
go version 1.11.5
Desktop (please complete the following information):
Macos 10.14.4
Additional context
Add any other context about the problem here.
please see https://github.com/swaggo/swag#use-swaggertype-tag-to-supported-custom-type, thanks.
please see https://github.com/swaggo/swag#use-swaggertype-tag-to-supported-custom-type, thanks.
Thanks.
Most helpful comment
please see https://github.com/swaggo/swag#use-swaggertype-tag-to-supported-custom-type, thanks.