feat(app): update
This commit is contained in:
@ -122,7 +122,7 @@ func (p Point) Value() (driver.Value, error) {
|
||||
return fmt.Sprintf("POINT(%f %f)", p.Lng, p.Lat), nil
|
||||
}
|
||||
|
||||
func (p *Point) Scan(src interface{}) error {
|
||||
func (p *Point) Scan(src any) error {
|
||||
switch src.(type) {
|
||||
case []byte:
|
||||
var b = src.([]byte)
|
||||
@ -156,7 +156,7 @@ func (loc Point) GormDataType() string {
|
||||
func (loc Point) GormValue(ctx context.Context, db *gorm.DB) clause.Expr {
|
||||
return clause.Expr{
|
||||
SQL: "ST_PointFromText(?)",
|
||||
Vars: []interface{}{fmt.Sprintf("POINT(%f %f)", loc.Lng, loc.Lat)},
|
||||
Vars: []any{fmt.Sprintf("POINT(%f %f)", loc.Lng, loc.Lat)},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user