🌱 Fix lint issues: govet linter (#395)

* Fix lint issues: govet linter
The fieldalignment analyzer informs you when structs would take up less
memory with their fields reordered.

* CheckResult.Details was not omitted as intended
Found by govet linter

* Removing possible breaking change

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
This commit is contained in:
Chris McGehee 2021-05-11 06:52:52 -07:00 committed by GitHub
parent c1ef0900f2
commit 727bb58911
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -27,6 +27,6 @@ type CheckRequest struct {
Client *github.Client
GraphClient *githubv4.Client
HTTPClient *http.Client
Owner, Repo string
Logf func(s string, f ...interface{})
Owner, Repo string
}

View File

@ -17,12 +17,12 @@ package checker
const MaxResultConfidence = 10
type CheckResult struct {
Name string
Pass bool
Confidence int
Details []string `json:omitempty`
ShouldRetry bool `json:"-"`
Error error `json:"-"`
Name string
Details []string
Confidence int
Pass bool
ShouldRetry bool `json:"-"`
}
func MakeInconclusiveResult(name string) CheckResult {

View File

@ -27,9 +27,9 @@ type scorecard struct {
Date string `json:"Date"`
Checks []struct {
CheckName string `json:"CheckName"`
Pass bool `json:"Pass"`
Confidence int `json:"Confidence"`
Details []string `json:"Details"`
Confidence int `json:"Confidence"`
Pass bool `json:"Pass"`
} `json:"Checks"`
MetaData []string `json:"MetaData"`
}

View File

@ -53,8 +53,8 @@ type RateLimitRoundTripper struct {
}
type RoundRobinTokenSource struct {
AccessTokens []string
log *zap.SugaredLogger
AccessTokens []string
}
func (r *RoundRobinTokenSource) Token() (*oauth2.Token, error) {