cridenour / go-postgis

PostGIS support for Go. Works with any Postgres driver.
MIT License
107 stars 26 forks source link

Scan panics for PointS #3

Closed jonnenauha closed 8 years ago

jonnenauha commented 8 years ago

The latest commit https://github.com/cridenour/go-postgis/commit/68195e47172557773f917acf28695bb63a4c332b seems to break something fundamental. Jumping back to https://github.com/cridenour/go-postgis/commit/76147ec3510372529de79885a7f06ca2b755cadc fixes this issue.

pointDB := postgis.PointS{}
err = postgres.QueryRow("SELECT GeomFromEWKB($1);", point).Scan(&pointDB)
FatalOnError(err)

Crashes into a panic

panic: sql: Scan error on column index 0: unexpected EOF

Did not investigate further than this. Hope this is enough to track it down.

cridenour commented 8 years ago

Thanks @jonnenauha - probably should have tested that last PR a little more. I'll go ahead and revert.

jonnenauha commented 8 years ago

np :) I vendored a working version already but might have broken others that fetch master.

Maybe you should also create a 1.0 tag or something after the revert, its quite nice to fetch those with eg. http://labix.org/gopkg.in

cridenour commented 8 years ago

Ok I pushed a revert and tagged a 1.0. Thanks for the report!