comparison pkg/models/cross.go @ 5712:6270951dda28 revive-cleanup

/interface{}/any/
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 20 Feb 2024 22:37:51 +0100
parents 1222b777f51f
children
comparison
equal deleted inserted replaced
5711:2dd155cc95ec 5712:6270951dda28
94 // CrossSectionOutput is the combination of the geometry 94 // CrossSectionOutput is the combination of the geometry
95 // and the properties of a cross section output. 95 // and the properties of a cross section output.
96 CrossSectionOutput struct { 96 CrossSectionOutput struct {
97 Type string `json:"type"` 97 Type string `json:"type"`
98 Geometry CrossSectionOutputGeometry `json:"geometry"` 98 Geometry CrossSectionOutputGeometry `json:"geometry"`
99 Properties map[string]interface{} `json:"properties"` 99 Properties map[string]any `json:"properties"`
100 } 100 }
101 ) 101 )
102 102
103 var ( 103 var (
104 errNoGeoJSONFeature = errors.New("not a valid GeoJSON feature") 104 errNoGeoJSONFeature = errors.New("not a valid GeoJSON feature")
199 fmt.Fprintf(&buf, "[%.8f,%.8f,%.8f]", cz.Lat, cz.Lon, cz.Z) 199 fmt.Fprintf(&buf, "[%.8f,%.8f,%.8f]", cz.Lat, cz.Lon, cz.Z)
200 return buf.Bytes(), nil 200 return buf.Bytes(), nil
201 } 201 }
202 202
203 // Scan implements sql.Scanner interface. 203 // Scan implements sql.Scanner interface.
204 func (lcz *GeoJSONLineCoordinatesZ) Scan(src interface{}) error { 204 func (lcz *GeoJSONLineCoordinatesZ) Scan(src any) error {
205 data, ok := src.([]byte) 205 data, ok := src.([]byte)
206 if !ok { 206 if !ok {
207 return errNoByteSlice 207 return errNoByteSlice
208 } 208 }
209 return lcz.FromWKB(data) 209 return lcz.FromWKB(data)
376 376
377 return nil 377 return nil
378 } 378 }
379 379
380 // Scan implements the sql.Scanner interface. 380 // Scan implements the sql.Scanner interface.
381 func (mls *GeoJSONMultiLineCoordinatesZ) Scan(src interface{}) error { 381 func (mls *GeoJSONMultiLineCoordinatesZ) Scan(src any) error {
382 if src == nil { 382 if src == nil {
383 return nil 383 return nil
384 } 384 }
385 data, ok := src.([]byte) 385 data, ok := src.([]byte)
386 if !ok { 386 if !ok {