internal/postgres: upsert module data

When we insert module information, make sure we overwrite existing
rows. Previously, we specified that new data should be ignored if the
row already existed, which meant that we were adding rows but never
changing them. That didn't matter at one point, when we deleted a
module before re-inserting it, but we no longer delete, so we must
upsert.

We also fix a number of places where our test modules had duplicate
directories. The upserts failed for these.

Change-Id: I97465b11e4ea6cbb7835e883f36f098445207eba
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/766365
Reviewed-by: Julie Qiu <julieqiu@google.com>
6 files changed
tree: c6134dc0380d24cc8fe71d45398a83916676d099
  1. cmd/
  2. content/
  3. devtools/
  4. doc/
  5. internal/
  6. migrations/
  7. third_party/
  8. .gitignore
  9. .prettierignore
  10. .prettierrc.yaml
  11. all.bash
  12. cloudbuild.yaml
  13. CONTRIBUTING.md
  14. go.mod
  15. go.sum
  16. LICENSE
  17. PATENTS
  18. README.md
README.md

Pkg.go.dev

Pkg.go.dev is a website for discovering and evaluting Go packages and modules.

Roadmap

Pkg.go.dev launched in November 2019, and is currently under active development by the Go team.

Our current goal is to work on addressing the UX feedback we have received. You can expect pkg.go.dev to be slated for some design changes coming soon. We plan to share these designs for feedback with everyone once they are ready.

Longer term, we are working towards redirecting godoc.org traffic to pkg.go.dev. We want to ensure that we address users' needs in the process. Read more about our next steps for pkg.go.dev. Issues related to redirecting godoc.org traffic are being tracked in Go issue #39144. We plan to address these issues before redirecting traffic from godoc.org to pkg.go.dev.

We encourage everyone to begin using pkg.go.dev today for all of their needs and file feedback! You can redirect all of your requests from godoc.org to pkg.go.dev, by clicking Always use pkg.go.dev at the top of any page on godoc.org.

If you are having issues with pkg.go.dev, please first check the known issues before following the troubleshooting guide. If that does not give you the information you need, reach out to us.

Issues

You can chat with us on the #tools slack channel on the Gophers slack.

If you think you have an issue that needs fixing, or a feature suggestion, then please make sure you follow the steps to file an issue with the right information to allow us to address it.

Contributing

We would love your help!

Our canonical Git repository is located cat go.googlesource.com/discovery. There is a mirror of the repository at github.com/golang/discovery.

To contribute, please read our contributing guide.

License

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.