-
Notifications
You must be signed in to change notification settings - Fork 13
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
Upgraded all dependencies; switched to Glide; modified types to int64… #132
base: master
Are you sure you want to change the base?
Conversation
… for better compatibility with new dependencies
main.go
Outdated
@@ -35,8 +35,8 @@ func main() { | |||
_ = godotenv.Load() | |||
|
|||
rootLogger := logger.New(os.Stdout, build, os.Getenv("LOGGER_ENV"), os.Getenv("LOGGER_SENTRY_DSN")) | |||
logger := rootLogger.With("area", "main") | |||
logger.With("build", build).Info("starting gopherci") | |||
logger_ := rootLogger.With("area", "main") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golint: don't use underscores in Go names; var logger_ should be logger
main.go
Outdated
} | ||
|
||
db, err := db.NewSQLDB(sqlDB, os.Getenv("DB_DRIVER")) | ||
db_, err := db.NewSQLDB(sqlDB, os.Getenv("DB_DRIVER")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golint: don't use underscores in Go names; var db_ should be db
main.go
Outdated
} | ||
|
||
// queuePush is used to add a job to the queue | ||
var queuePush = make(chan interface{}) | ||
|
||
gh, err := github.New(rootLogger, analyse, db, queuePush, int(integrationID), integrationKey, os.Getenv("GITHUB_WEBHOOK_SECRET"), os.Getenv("GCI_BASE_URL")) | ||
gh_, err := github.New(rootLogger, analyse, db_, queuePush, integrationID, integrationKey, os.Getenv("GITHUB_WEBHOOK_SECRET"), os.Getenv("GCI_BASE_URL")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golint: don't use underscores in Go names; var gh_ should be gh
main.go
Outdated
} | ||
|
||
// Web routes | ||
web, err := web.NewWeb(rootLogger.With("area", "web"), db, gh) | ||
web_, err := web.NewWeb(rootLogger.With("area", "web"), db_, gh_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golint: don't use underscores in Go names; var web_ should be web
internal/github/handlers_test.go
Outdated
@@ -87,8 +87,8 @@ func setup(t *testing.T) (*GitHub, *mockAnalyser, *db.MockDB) { | |||
wg sync.WaitGroup | |||
c = make(chan interface{}) | |||
) | |||
queue := queue.NewMemoryQueue(logger.Testing()) | |||
queue.Wait(context.Background(), &wg, c, func(job interface{}) {}) | |||
queue_ := queue.NewMemoryQueue(logger.Testing()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golint: don't use underscores in Go names; var queue_ should be queue
@@ -19,7 +19,7 @@ type Installation struct { | |||
client *github.Client | |||
} | |||
|
|||
func (g *GitHub) NewInstallation(installationID int) (*Installation, error) { | |||
func (g *GitHub) NewInstallation(installationID int64) (*Installation, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golint: exported method GitHub.NewInstallation should have comment or be unexported
internal/github/reporters_test.go
Outdated
@@ -53,8 +53,8 @@ func TestDedupePRIssues(t *testing.T) { | |||
Position: github.Int(expectedCmtPos + 2), | |||
}, | |||
} | |||
json, _ := json.Marshal(comments) | |||
fmt.Fprint(w, string(json)) | |||
json_, _ := json.Marshal(comments) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golint: don't use underscores in Go names; var json_ should be json
internal/github/reporters_test.go
Outdated
json, _ := json.Marshal(comments) | ||
fmt.Fprint(w, string(json)) | ||
var comments []*github.PullRequestComment | ||
json_, _ := json.Marshal(comments) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golint: don't use underscores in Go names; var json_ should be json
internal/queue/gcp-pubsub.go
Outdated
@@ -160,24 +160,24 @@ type container struct { | |||
// receive calls sub.Receive, which blocks forever waiting for new jobs. | |||
func (q *GCPPubSubQueue) receive(ctx context.Context, f func(interface{})) { | |||
err := q.subscription.Receive(ctx, func(ctx xContext.Context, msg *pubsub.Message) { | |||
logger := q.logger.With("messageID", msg.ID) | |||
logger_ := q.logger.With("messageID", msg.ID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golint: don't use underscores in Go names; var logger_ should be logger
internal/web/web.go
Outdated
@@ -70,11 +70,11 @@ func (web *Web) AnalysisHandler(w http.ResponseWriter, r *http.Request) { | |||
return | |||
} | |||
|
|||
logger := web.logger.With("analysisID", analysisID) | |||
logger_ := web.logger.With("analysisID", analysisID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golint: don't use underscores in Go names; var logger_ should be logger
No description provided.