Define value method on non-pointer type

This commit is contained in:
Melon 2024-06-12 14:47:05 +01:00
parent 69fa6a4812
commit 5751f0296b
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -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
}