Closed ARolek closed 4 years ago
A helper function that would accept the geom.Geometry container type and then return either a string or a GeomType. This is useful when writing an error message like:
fmt.Printf("expected %t, got %t", geom.LineString{}, goem.Type(geom.Geometry))
Potential function signature
func geom.Type(geom.Geometry) GeomType { // switch on the type and return it }
Are you sure this is needed? https://play.golang.org/p/uQtcbPQjwdy This seems to print the base type when you use '%T"
@gdey indeed it does. I learned something new today.
A helper function that would accept the geom.Geometry container type and then return either a string or a GeomType. This is useful when writing an error message like:
Potential function signature