do not use deprecated functions/methods (#2027)
Signed-off-by: Gaurav Gahlot <gauravgahlot0107@gmail.com> Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
co-authored by
Sanket Sudake
parent
524e7bcfd3
commit
3880279e89
@@ -256,7 +256,7 @@ Options:
|
||||
defer logger.Sync()
|
||||
|
||||
version := fmt.Sprintf("Fission Bundle Version: %v", info.BuildInfo().String())
|
||||
arguments, err := docopt.Parse(usage, nil, true, version, false)
|
||||
arguments, err := docopt.ParseArgs(usage, nil, version)
|
||||
if err != nil {
|
||||
logger.Fatal("Could not parse command line arguments", zap.Error(err))
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ Options:
|
||||
--fn-pod-namespace=<podNamespace> Namespace where function pods get deployed.
|
||||
--envbuilder-namespace=<envBuilderNamespace> Namespace where builder env pods are deployed.`
|
||||
|
||||
arguments, err := docopt.Parse(usage, nil, true, info.BuildInfo().String(), false)
|
||||
arguments, err := docopt.ParseArgs(usage, nil, info.BuildInfo().String())
|
||||
if err != nil {
|
||||
logger.Fatal("Could not parse command line arguments", zap.Error(err))
|
||||
}
|
||||
|
||||
@@ -212,7 +212,6 @@ func (kafka Kafka) getTLSConfig() (*tls.Config, error) {
|
||||
caCertPool := x509.NewCertPool()
|
||||
caCertPool.AppendCertsFromPEM(kafka.authKeys["caCert"])
|
||||
tlsConfig.RootCAs = caCertPool
|
||||
tlsConfig.BuildNameToCertificate()
|
||||
|
||||
return &tlsConfig, nil
|
||||
}
|
||||
@@ -323,7 +322,7 @@ func kafkaMsgHandler(kafka *Kafka, producer sarama.SyncProducer, trigger *fv1.Me
|
||||
return
|
||||
}
|
||||
if resp.StatusCode != 200 {
|
||||
errorString := string("request returned failure: " + string(resp.StatusCode))
|
||||
errorString := string("request returned failure: " + strconv.Itoa(resp.StatusCode))
|
||||
errorHeaders := generateErrorHeaders(errorString)
|
||||
errorHandler(kafka.logger, trigger, producer, url,
|
||||
fmt.Errorf("request returned failure: %v", resp.StatusCode), errorHeaders)
|
||||
|
||||
Reference in New Issue
Block a user