Skip to content

Commit

Permalink
fix: remove unused fields from stucts (linting)
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Horton <[email protected]>
  • Loading branch information
madpah committed Jun 21, 2024
1 parent 87f5cdf commit e74ce6f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
22 changes: 12 additions & 10 deletions github/github_mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ package github

import (
"context"
"github.com/google/go-github/v42/github"
"github.com/stretchr/testify/assert"
"net/http"
"os"
"testing"

"github.com/google/go-github/v42/github"
"github.com/stretchr/testify/assert"
)

// RepositoriesMock mocks RepositoriesService
Expand All @@ -34,14 +35,14 @@ type RepositoriesMock struct {
assertParameters bool
expectedCtx context.Context
expectedOwner, expectedRepo, expectedRef, expectedUser string
expectedOpts *github.ListOptions
expectedCreateStatusRepoStatus *github.RepoStatus
createStatusRepoStatus *github.RepoStatus
createStatusResponse *github.Response
createStatusError error
isCollaboratorResult bool
isCollaboratorResp *github.Response
isCollaboratorErr error
// expectedOpts *github.ListOptions
expectedCreateStatusRepoStatus *github.RepoStatus
createStatusRepoStatus *github.RepoStatus
createStatusResponse *github.Response
createStatusError error
isCollaboratorResult bool
isCollaboratorResp *github.Response
isCollaboratorErr error
}

var _ RepositoriesService = (*RepositoriesMock)(nil)
Expand Down Expand Up @@ -245,6 +246,7 @@ type GHInterfaceMock struct {
var _ GHInterface = (*GHInterfaceMock)(nil)

// NewClient something
//
//goland:noinspection GoUnusedParameter
func (g *GHInterfaceMock) NewClient(httpClient *http.Client) GHClient {
return GHClient{
Expand Down
25 changes: 13 additions & 12 deletions github/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ package github

import (
"fmt"
"github.com/sonatype-nexus-community/the-cla/db"
"github.com/sonatype-nexus-community/the-cla/types"
"go.uber.org/zap"
"go.uber.org/zap/zaptest"
"net/http"
"os"
"strings"
"testing"
"time"

"github.com/sonatype-nexus-community/the-cla/db"
"github.com/sonatype-nexus-community/the-cla/types"
"go.uber.org/zap"
"go.uber.org/zap/zaptest"

"github.com/google/go-github/v42/github"
"github.com/stretchr/testify/assert"
webhook "gopkg.in/go-playground/webhooks.v5/github"
Expand Down Expand Up @@ -206,14 +207,14 @@ type mockCLADb struct {
migrateDBSourceURL string
migrateDBSourceError error
storeUsersNeedingToSignEvalInfo *types.EvaluationInfo
storeUsersNeedingToSignTime time.Time
storeUsersNeedingToSignCLAErr error
getPRsForUserUser *types.UserSignature
getPRsForUserEvalInfo []types.EvaluationInfo
getPRsForUserError error
removePRsUsersSigned []types.UserSignature
removePRsEvalInfo *types.EvaluationInfo
removePRsError error
// storeUsersNeedingToSignTime time.Time
storeUsersNeedingToSignCLAErr error
getPRsForUserUser *types.UserSignature
getPRsForUserEvalInfo []types.EvaluationInfo
getPRsForUserError error
removePRsUsersSigned []types.UserSignature
removePRsEvalInfo *types.EvaluationInfo
removePRsError error
}

var _ db.IClaDB = (*mockCLADb)(nil)
Expand Down

0 comments on commit e74ce6f

Please sign in to comment.