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

Upgraded all dependencies; switched to Glide; modified types to int64… #132

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

SamuelMarks
Copy link

No description provided.

… 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")
Copy link

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"))
Copy link

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"))
Copy link

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_)
Copy link

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

@@ -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())
Copy link

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) {
Copy link

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

@@ -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)
Copy link

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

json, _ := json.Marshal(comments)
fmt.Fprint(w, string(json))
var comments []*github.PullRequestComment
json_, _ := json.Marshal(comments)
Copy link

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

@@ -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)
Copy link

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

@@ -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)
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant