Skip to content

Commit

Permalink
refactor: cleanup Sprintf for Bearer token
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorropo committed Sep 1, 2022
1 parent 39cc238 commit dbe72d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pinning/remote/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ type Client struct {
func NewClient(url, bearerToken string) *Client {
config := openapi.NewConfiguration()
config.UserAgent = UserAgent
bearer := fmt.Sprintf("Bearer %s", bearerToken)
config.AddDefaultHeader("Authorization", bearer)
config.AddDefaultHeader("Authorization", "Bearer "+bearerToken)
config.Servers = openapi.ServerConfigurations{
openapi.ServerConfiguration{
URL: url,
Expand Down

0 comments on commit dbe72d0

Please sign in to comment.