Skip to content

Commit

Permalink
Merge pull request #203 from xmidt-org/fix-style
Browse files Browse the repository at this point in the history
Fix the style and checking.
  • Loading branch information
schmidtw authored Aug 8, 2023
2 parents 33e8d34 + c792080 commit 5206345
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
uses: xmidt-org/shared-go/.github/workflows/ci.yml@6dd1fab69f841fbea827a053e21fa83ea94774d9 # v3.0.0
with:
copyright-skip: true
style-skip: true
go-generate-deps: golang.org/x/tools/cmd/stringer@latest
release-type: library
secrets: inherit
12 changes: 6 additions & 6 deletions acquire/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"net/http"
)

//ErrEmptyCredentials is returned whenever an Acquirer is attempted to
//be built with empty credentials.
//Use DefaultAcquirer for such no-op use case.
// ErrEmptyCredentials is returned whenever an Acquirer is attempted to
// be built with empty credentials.
// Use DefaultAcquirer for such no-op use case.
var ErrEmptyCredentials = errors.New("Empty credentials are not valid")

// Acquirer gets an Authorization value that can be added to an http request.
Expand All @@ -39,12 +39,12 @@ type Acquirer interface {
// DefaultAcquirer is a no-op Acquirer.
type DefaultAcquirer struct{}

//Acquire returns the zero values of the return types.
// Acquire returns the zero values of the return types.
func (d *DefaultAcquirer) Acquire() (string, error) {
return "", nil
}

//AddAuth adds an auth value to the Authorization header of an http request.
// AddAuth adds an auth value to the Authorization header of an http request.
func AddAuth(r *http.Request, acquirer Acquirer) error {
if r == nil {
return errors.New("can't add authorization to nil request")
Expand All @@ -67,7 +67,7 @@ func AddAuth(r *http.Request, acquirer Acquirer) error {
return nil
}

//FixedValueAcquirer implements Acquirer with a constant authorization value.
// FixedValueAcquirer implements Acquirer with a constant authorization value.
type FixedValueAcquirer struct {
authValue string
}
Expand Down
4 changes: 2 additions & 2 deletions attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ func (a BasicAttributes) Get(key string) (interface{}, bool) {
return v, ok
}

//NewAttributes builds an Attributes instance with
//the given map as datasource.
// NewAttributes builds an Attributes instance with
// the given map as datasource.
func NewAttributes(m map[string]interface{}) Attributes {
return BasicAttributes(m)
}
Expand Down
2 changes: 1 addition & 1 deletion basculechecks/metricvalidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var (

// CapabilitiesChecker is an object that can determine if a request is
// authorized given a bascule.Authentication object. If it's not authorized, an
// error is given for logging and metrics.
// error is given for logging and metrics.
type CapabilitiesChecker interface {
CheckAuthentication(auth bascule.Authentication, vals ParsedValues) error
}
Expand Down

0 comments on commit 5206345

Please sign in to comment.