lib / pq

Pure Go Postgres driver for database/sql
https://pkg.go.dev/github.com/lib/pq
MIT License
9.04k stars 909 forks source link

wasip1: compile user_posix.go on GOOS=wasip1 #1130

Closed achille-roussel closed 5 months ago

achille-roussel commented 1 year ago

Hello!

The upcoming Go 1.21 is going to a new port named wasip1. At this time lib/pq fails to compile for this new target due to the user_*.go build tags. See the draft release notes for details https://tip.golang.org/doc/go1.21#wasip1

With this PR, I would like to suggest that we add the wasip1 tag to user_posix.go so the file gets included in Go programs compiled with GOOS=wasip1, which then defines the missing userCurrent function.

Please let me know if you have any questions!