Skip to content
This repository has been archived by the owner on Jan 20, 2020. It is now read-only.

Commit

Permalink
mod: upgrade to gqlgen@v0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bobheadxi committed May 17, 2019
1 parent bcbdd75 commit 0df5555
Show file tree
Hide file tree
Showing 6 changed files with 226 additions and 292 deletions.
12 changes: 6 additions & 6 deletions db/repos.go
Expand Up @@ -110,7 +110,7 @@ func (r *ReposDatabase) GetRepository(
}

// GetRepositories fetches all repositories associated with the given owner
func (r *ReposDatabase) GetRepositories(ctx context.Context, h host.Host, owner string) ([]models.Repository, error) {
func (r *ReposDatabase) GetRepositories(ctx context.Context, h host.Host, owner string) ([]*models.Repository, error) {
rows, err := r.db.pg.QueryEx(ctx, `
SELECT
id, owner, name, description
Expand All @@ -127,13 +127,13 @@ func (r *ReposDatabase) GetRepositories(ctx context.Context, h host.Host, owner
return nil, err
}

var repos = make([]models.Repository, 0)
var repos = make([]*models.Repository, 0)
for rows.Next() {
var repo models.Repository
if err := rows.Scan(&repo.ID, &repo.Owner, &repo.Name, &repo.Description); err != nil {
return nil, err
}
repos = append(repos, repo)
repos = append(repos, &repo)
}

if len(repos) == 0 {
Expand Down Expand Up @@ -372,7 +372,7 @@ func (r *ReposDatabase) InsertHostItems(
func (r *ReposDatabase) GetGlobalBurndown(
ctx context.Context,
repoID int,
) ([]models.BurndownEntry, error) {
) ([]*models.BurndownEntry, error) {
rows, err := r.db.pg.Query(fmt.Sprintf(`
SELECT
interval, delta_bands
Expand All @@ -386,7 +386,7 @@ func (r *ReposDatabase) GetGlobalBurndown(
}
defer rows.Close()

entries := make([]models.BurndownEntry, 0)
entries := make([]*models.BurndownEntry, 0)
for rows.Next() {
var (
interval pgtype.Tsrange
Expand All @@ -400,7 +400,7 @@ func (r *ReposDatabase) GetGlobalBurndown(
for i, v := range deltaBands {
intBands[i] = int(v)
}
entries = append(entries, models.BurndownEntry{
entries = append(entries, &models.BurndownEntry{
Start: interval.Lower.Time,
Bands: intBands,
})
Expand Down
9 changes: 4 additions & 5 deletions go.mod
Expand Up @@ -4,7 +4,7 @@ go 1.12

require (
cloud.google.com/go v0.38.0
github.com/99designs/gqlgen v0.8.3
github.com/99designs/gqlgen v0.9.0
github.com/Jeffail/tunny v0.0.0-20181108205650-4921fff29480 // indirect
github.com/antchfx/xpath v0.0.0-20190319080838-ce1d48779e67 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible
Expand All @@ -14,11 +14,11 @@ require (
github.com/go-chi/chi v4.0.2+incompatible
github.com/go-chi/cors v1.0.0
github.com/go-redis/redis v6.15.2+incompatible
github.com/gogo/protobuf v1.1.1 // indirect
github.com/golang/mock v1.3.0 // indirect
github.com/google/go-github/v25 v25.0.2
github.com/google/pprof v0.0.0-20190502144155-8358a9778bd1 // indirect
github.com/google/uuid v1.1.1
github.com/gorilla/context v1.1.1 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jackc/pgx v3.4.0+incompatible
Expand All @@ -30,8 +30,8 @@ require (
github.com/minio/highwayhash v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/neurosnap/sentences v1.0.6 // indirect
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 // indirect
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3
github.com/src-d/go-oniguruma v1.0.0 // indirect
Expand All @@ -45,7 +45,6 @@ require (
go.uber.org/zap v1.10.0
golang.org/x/lint v0.0.0-20190409202823-959b441ac422
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a
golang.org/x/tools v0.0.0-20190503185657-3b6f9c0030f7 // indirect
google.golang.org/api v0.4.0
gopkg.in/bblfsh/client-go.v3 v3.2.1 // indirect
gopkg.in/bblfsh/sdk.v1 v1.17.0 // indirect
Expand Down

0 comments on commit 0df5555

Please sign in to comment.