remove redundunt type conversion, unused variable...etc

`Framework` variable has been removed from test/*
unwanted `[]byte` conversion has been removed
import alias has been avoided

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
This commit is contained in:
Humble Chirammal 2023-05-19 10:08:23 +05:30
parent 15a1f9a39d
commit c74790e266
4 changed files with 3 additions and 5 deletions

View File

@ -111,7 +111,7 @@ func connectSCTP(dest string, timeout time.Duration) {
}
timeoutCh := time.After(timeout)
errCh := make(chan (error))
errCh := make(chan error)
go func() {
conn, err := sctp.DialSCTP("sctp", nil, addr)

View File

@ -29,7 +29,7 @@ import (
"runtime"
"time"
oidc "github.com/coreos/go-oidc"
"github.com/coreos/go-oidc"
"github.com/spf13/cobra"
"golang.org/x/oauth2"
"gopkg.in/square/go-jose.v2/jwt"

View File

@ -61,7 +61,7 @@ func TestAddLabel(t *testing.T) {
review := v1.AdmissionReview{Request: &v1.AdmissionRequest{Object: runtime.RawExtension{Raw: raw}}}
response := addLabel(review)
if response.Patch != nil {
patchObj, err := jsonpatch.DecodePatch([]byte(response.Patch))
patchObj, err := jsonpatch.DecodePatch(response.Patch)
if err != nil {
t.Fatal(err)
}

View File

@ -37,6 +37,4 @@ const (
UnknownFunction = "unknown function"
IncorrectFunctionArgument = "incorrect function argument"
NotGivenFunctionArgument = "not given function argument"
FrameworkName = "horizontal-pod-autoscaling"
)