Linter fixes PR 3 (#4415)

* Linter fixes

* fix(bsr): update test to register TEST protocol once

---------

Co-authored-by: Damian Debkowski <damian.debkowski@hashicorp.com>
This commit is contained in:
Jeff MitchellandDamian Debkowski authored and GitHub committed 2024-02-16 08:30:16 -05:00
1 parent e95eda7ca2
commit 35cef97bd4
119 files changed
+365 -300

No files matched your search

@@ -86,7 +86,7 @@ type Config struct {
// search query to trigger an inline refresh.
MaxSearchStaleness time.Duration
// The maximum amount of time a refresh should block a search request from
// completeing before it times out.
// completing before it times out.
MaxSearchRefreshTimeout time.Duration
}
@@ -176,7 +176,9 @@ func defaultBoundaryTokenReader(ctx context.Context, cp ClientProvider) (cache.B
if err != nil {
return nil, err
}
c.SetAddr(addr)
if err := c.SetAddr(addr); err != nil {
return nil, err
}
c.SetToken(tok)
atClient := authtokens.NewClient(c)
@@ -49,7 +49,7 @@ type BoundaryStatus struct {
Address string `json:"address,omitempty"`
// Whether the controller responses are supported by the cache
CacheSupport string `json:"cache_support,omitempty"`
// How long ago the Boundary instance was checked for cache compatability
// How long ago the Boundary instance was checked for cache compatibility
LastSupportCheck time.Duration `json:"last_support_check,omitempty"`
}
@@ -112,7 +112,10 @@ func newStatusHandlerFunc(ctx context.Context, repo *cache.Repository, socketAdd
return
}
w.Header().Set("Content-Type", "application/json")
w.Write(j)
if _, err := w.Write(j); err != nil {
writeError(w, err.Error(), http.StatusInternalServerError)
return
}
}, nil
}