Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review the golang packages we use #97

Closed
11 of 15 tasks
krnowak opened this issue Nov 12, 2019 · 4 comments · Fixed by #333
Closed
11 of 15 tasks

Review the golang packages we use #97

krnowak opened this issue Nov 12, 2019 · 4 comments · Fixed by #333
Assignees
Labels
backend Issues related to the backend

Comments

@krnowak
Copy link
Member

krnowak commented Nov 12, 2019

Related to #70 and #34.

The "nothing fancy" or "quick wins" packages:

  • github.com/blang/semver

    • Semver parser.
    • We should update it to github.com/blang/semver/v4, it's the release that's compatible with go modules.
  • gopkg.in/fatih/set.v0

    • Just a set library. It's an archived and unmaintained project.
    • Just write our own set difference function.
  • github.com/satori/go.uuid

    • Uuid generator and stuff.
    • Using latest release already.
    • Unmaintained and buggy, needs replacing.

The database packages:

  • github.com/jmoiron/sqlx

    • Extended golang's database/sql.
    • Already updated to latest release. We will see if we need it when
      we decide on new ORM.
    • The goqu package also provides some wrappers around database/sql,
      which we don't currently use. We could see if goqu could replace this
      package.
  • github.com/lib/pq

  • github.com/rubenv/sql-migrate

    • Schema migration thingy.
    • Could be updated, there are no releases, though.
  • gopkg.in/mgutz/dat.v1

The web framework packages:

Other packages:

  • github.com/aquam8/go-omaha

    • Should use github.com/coreos/go-omaha or our own fork.
  • github.com/facebookgo/grace

    • Used only in the demo.
    • Consider making the demo a separate module maybe.
  • github.com/google/go-github

    • Library for talking to github.
    • Needs updating.
  • github.com/mgutz/logxi

    • A logging solution.
    • Use logrus or glog.
  • github.com/stretchr/testify

    • Some testing helpers.
    • Already using the latest release.
    • Do we want to use something else?
  • golang.org/x/oauth2

    • Client for oauth2.
    • There are no releases, could bump it to latest revision.
@krnowak
Copy link
Member Author

krnowak commented Nov 13, 2019

Currently github.com/blang/semver can't be updated, because it is broken wrt go modules. We use v3.5.1, newest version is v3.6.1. v3.5.1 is the last version that does not specify the go.mod file. Once a project applies to become a go module and has version like v3.6.1, it should have a v3 package. So something like github.com/blang/semver/v3. There is already an issue about it: blang/semver#63.

@krnowak
Copy link
Member Author

krnowak commented Nov 14, 2019

The https://github.com/google/go-github package provides support for v3 REST API, while github also supports a v4 GraphQL API, which can be used with https://github.com/shurcooL/githubv4. For now just updating the package. We can think about migrating to github v4 API later.

@krnowak
Copy link
Member Author

krnowak commented Nov 28, 2019

The uuid library we use needs to be replaced too. It's unmaintained and has bugs - satori/go.uuid#103. There seem to be a replacement - https://github.com/gofrs/uuid (or we can use something else - https://github.com/google/uuid).

@joaquimrocha joaquimrocha added the backend Issues related to the backend label Feb 28, 2020
@krnowak
Copy link
Member Author

krnowak commented Jun 12, 2020

I updated the list - we replaced dat with goqu, and pq with pgx. We could update github.com/blang/semver to github.com/blang/semver/v4, so it's go modules compatible. sqlx could likely be replaced with goqu.

@joaquimrocha joaquimrocha added this to the Next feature release milestone Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Issues related to the backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants