Skip to content

Commit

Permalink
updated the golint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shanmydell committed Dec 22, 2023
1 parent fbe236b commit 6f584a2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions client_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

package gopowerstore

type ContextKey string

// ClientOptions defaults
const (
clientOptionsDefaultInsecure = false
Expand All @@ -39,7 +37,7 @@ type ClientOptions struct {
defaultTimeout *uint64
rateLimit *uint64
// define field name in context which will be used for tracing
requestIDKey *ContextKey
requestIDKey *api.ContextKey

Check failure on line 40 in client_options.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: api

Check failure on line 40 in client_options.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: api
}

// Insecure returns insecure client option
Expand Down Expand Up @@ -67,7 +65,7 @@ func (co *ClientOptions) RateLimit() uint64 {
}

// RequestIDKey returns client requestIDKey
func (co *ClientOptions) RequestIDKey() ContextKey {
func (co *ClientOptions) RequestIDKey() api.ContextKey {

Check failure on line 68 in client_options.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: api

Check failure on line 68 in client_options.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: api
if co.requestIDKey == nil {
return clientOptionsDefaultRequestIDKey
}
Expand All @@ -93,7 +91,7 @@ func (co *ClientOptions) SetRateLimit(value uint64) *ClientOptions {
}

// SetRequestIDKey sets requestIdKey value
func (co *ClientOptions) SetRequestIDKey(value ContextKey) *ClientOptions {
func (co *ClientOptions) SetRequestIDKey(value api.ContextKey) *ClientOptions {

Check failure on line 94 in client_options.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: api

Check failure on line 94 in client_options.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: api
co.requestIDKey = &value
return co
}

0 comments on commit 6f584a2

Please sign in to comment.