mirror of
https://github.com/1f349/tulip.git
synced 2024-12-22 16:24:10 +00:00
Define value method on non-pointer type
This commit is contained in:
parent
69fa6a4812
commit
5751f0296b
@ -10,6 +10,7 @@ import (
|
||||
|
||||
var (
|
||||
_ sql.Scanner = &UserPronoun{}
|
||||
_ driver.Valuer = &UserPronoun{}
|
||||
_ json.Marshaler = &UserPronoun{}
|
||||
_ json.Unmarshaler = &UserPronoun{}
|
||||
)
|
||||
@ -29,7 +30,7 @@ func (p *UserPronoun) Scan(src any) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *UserPronoun) Value() (driver.Value, error) {
|
||||
func (p UserPronoun) Value() (driver.Value, error) {
|
||||
return p.Pronoun.String(), nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user