2
0

Add Undefined status to invalid Polygon

This commit is contained in:
duohedron
2020-10-06 09:05:55 +02:00
committed by Jack Christensen
parent e09987f1d6
commit 6166c99b77
+1
View File
@@ -54,6 +54,7 @@ func parseFloat64(src []float64) (*Polygon, error) {
return p, nil
}
if len(src)%2 != 0 {
p.Status = Undefined
return p, errors.Errorf("invalid length for polygon: %v", len(src))
}
p.Status = Present