Update go dependencies to latest and actions used in workflows (#2510)
* Updated all Go language dependencies to latest version available * Formatted all files as per gofmt * Update Golangci-lint version to 1.48.0 * Updated action version wherer application in Github workflows * Updated Kubernetes version to latest available * Remove "io/ioutil" references and replace with "io"/"os" Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ package httpserver
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
@@ -51,7 +51,7 @@ func TestStartServer(t *testing.T) {
|
||||
if resp.StatusCode != test.StatusCode {
|
||||
t.Errorf("expected status code %v, got %v", test.StatusCode, resp.StatusCode)
|
||||
}
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
t.Errorf("failed to read response body: %v", err)
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -13,11 +13,13 @@ import (
|
||||
fv1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
)
|
||||
|
||||
/* GetAttributesForFunction returns a set of attributes for a function. Attributes returned:
|
||||
function-name
|
||||
function-namespace
|
||||
environment-name
|
||||
environment-namespace
|
||||
/*
|
||||
GetAttributesForFunction returns a set of attributes for a function. Attributes returned:
|
||||
function-name
|
||||
function-namespace
|
||||
environment-name
|
||||
environment-namespace
|
||||
|
||||
These attributes are tags that can be used to filter traces.
|
||||
*/
|
||||
func GetAttributesForFunction(fn *fv1.Function) []attribute.KeyValue {
|
||||
|
||||
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
+1
-2
@@ -22,7 +22,6 @@ import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -220,7 +219,7 @@ func IsZip(filename string) (bool, error) {
|
||||
func GetCurrentNamespace() (string, error) {
|
||||
|
||||
// This file contains the namespace and can be found in each container.
|
||||
body, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace")
|
||||
body, err := os.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user