mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
Bump golangci-lint, more gocritic linters (#8052)
- Bump golangci-lint -> 2.6.2 - Fix all `deprecatedComment` "notices should be in a dedicated paragraph, separated from the rest" reports - Enable `appendCombine` and fix all "appendCombine: can combine chain of X appends into one" notices - Enable `preferFprint` and fix the few reported issues - Fix various issues reported only once or twice, like `zeroByteRepeat` Signed-off-by: Anders Eknert <anders.eknert@apple.com>
This commit is contained in:
@@ -201,6 +201,7 @@ const (
|
||||
// ParamBundleActivationV1 defines the name of the HTTP URL parameter that
|
||||
// indicates the client wants to include bundle activation in the results
|
||||
// of the health API.
|
||||
//
|
||||
// Deprecated: Use ParamBundlesActivationV1 instead.
|
||||
ParamBundleActivationV1 = v1.ParamBundleActivationV1
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ func Error(w http.ResponseWriter, status int, err *types.ErrorV1) {
|
||||
|
||||
// JSON writes a response with the specified status code and object. The object
|
||||
// will be JSON serialized.
|
||||
//
|
||||
// Deprecated: This method is problematic when using a non-200 status `code`: if
|
||||
// encoding the payload fails, it'll print "superfluous call to WriteHeader()"
|
||||
// logs.
|
||||
@@ -50,6 +51,7 @@ func JSONOK(w http.ResponseWriter, v any, pretty bool) {
|
||||
}
|
||||
|
||||
// Bytes writes a response with the specified status code and bytes.
|
||||
//
|
||||
// Deprecated: Unused in OPA, will be removed in the future.
|
||||
func Bytes(w http.ResponseWriter, code int, bs []byte) {
|
||||
v1.Bytes(w, code, bs)
|
||||
|
||||
Reference in New Issue
Block a user