comparison pkg/imports/wkb.go @ 4177:8b75ac5e243e

Made 'staticcheck' happy with pgxutils package.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 05 Aug 2019 17:16:46 +0200
parents 63475c8e710e
children 5da02dcc51f6
comparison
equal deleted inserted replaced
4176:c9315a6eb2c2 4177:8b75ac5e243e
118 case *shp.PolygonZ: 118 case *shp.PolygonZ:
119 return toPolygon(p.NumParts, p.Parts, p.Points), nil 119 return toPolygon(p.NumParts, p.Parts, p.Points), nil
120 case *shp.PolygonM: 120 case *shp.PolygonM:
121 return toPolygon(p.NumParts, p.Parts, p.Points), nil 121 return toPolygon(p.NumParts, p.Parts, p.Points), nil
122 } 122 }
123 return nil, fmt.Errorf("Unsupported shape type %T", s) 123 return nil, fmt.Errorf("unsupported shape type %T", s)
124 } 124 }
125 125
126 func toPolygon(numParts int32, parts []int32, points []shp.Point) polygonSlice { 126 func toPolygon(numParts int32, parts []int32, points []shp.Point) polygonSlice {
127 out := make(polygonSlice, numParts) 127 out := make(polygonSlice, numParts)
128 var pos int32 128 var pos int32