Upgraded to Go latest version 1.23.1 (#3027)

* Upgraded to latest go version 1.23.1
* Fix lint failure
* Fix lint failures
* Remove unnecessary formatting

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
This commit is contained in:
soharab-ic
2024-09-30 19:33:10 +05:30
committed by GitHub
parent 2f8ad16639
commit 9bdac9a334
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ on:
workflow_dispatch: workflow_dispatch:
env: env:
GOLANGCI_LINT_VERSION: v1.57.0 GOLANGCI_LINT_VERSION: v1.61.0
GOLANGCI_LINT_TIMEOUT: 5m GOLANGCI_LINT_TIMEOUT: 5m
jobs: jobs:
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/fission/fission module github.com/fission/fission
go 1.22.2 go 1.23.1
require ( require (
dario.cat/mergo v1.0.0 dario.cat/mergo v1.0.0
+2 -2
View File
@@ -426,7 +426,7 @@ func (gp *GenericPool) specializePod(ctx context.Context, pod *apiv1.Pod, fn *fv
zap.String("configmap_namespace", cm.Namespace), zap.String("configmap_namespace", cm.Namespace),
zap.String("function_name", fn.ObjectMeta.Name), zap.String("function_name", fn.ObjectMeta.Name),
zap.String("function_namespace", gp.fnNamespace)) zap.String("function_namespace", gp.fnNamespace))
return fmt.Errorf(fmt.Sprintf("configmap %s must be in same namespace as function namespace", cm.Name)) return fmt.Errorf("configmap %s must be in same namespace as function namespace", cm.Name)
} else { } else {
return err return err
} }
@@ -441,7 +441,7 @@ func (gp *GenericPool) specializePod(ctx context.Context, pod *apiv1.Pod, fn *fv
zap.String("secret_namespace", sec.Namespace), zap.String("secret_namespace", sec.Namespace),
zap.String("function_name", fn.ObjectMeta.Name), zap.String("function_name", fn.ObjectMeta.Name),
zap.String("function_namespace", gp.fnNamespace)) zap.String("function_namespace", gp.fnNamespace))
return fmt.Errorf(fmt.Sprintf("secret %s must be in same namespace as function namespace", sec.Name)) return fmt.Errorf("secret %s must be in same namespace as function namespace", sec.Name)
} else { } else {
return err return err
} }
+2 -2
View File
@@ -200,7 +200,7 @@ func (ch *MqtConsumerGroupHandler) kafkaMsgHandler(msg *sarama.ConsumerMessage)
errorString := fmt.Sprintf("request exceed retries: %v", ch.trigger.Spec.MaxRetries) errorString := fmt.Sprintf("request exceed retries: %v", ch.trigger.Spec.MaxRetries)
errorHeaders := generateErrorHeaders(errorString) errorHeaders := generateErrorHeaders(errorString)
errorHandler(ch.logger, ch.trigger, ch.producer, ch.fnUrl, errorHandler(ch.logger, ch.trigger, ch.producer, ch.fnUrl,
fmt.Errorf(errorString), errorHeaders) errors.New(errorString), errorHeaders)
return return
} }
defer resp.Body.Close() defer resp.Body.Close()
@@ -215,7 +215,7 @@ func (ch *MqtConsumerGroupHandler) kafkaMsgHandler(msg *sarama.ConsumerMessage)
errorString := "request body error: " + string(body) errorString := "request body error: " + string(body)
errorHeaders := generateErrorHeaders(errorString) errorHeaders := generateErrorHeaders(errorString)
errorHandler(ch.logger, ch.trigger, ch.producer, ch.fnUrl, errorHandler(ch.logger, ch.trigger, ch.producer, ch.fnUrl,
errors.Wrapf(err, errorString), errorHeaders) errors.Wrap(err, errorString), errorHeaders)
return return
} }
if resp.StatusCode != 200 { if resp.StatusCode != 200 {