From 1fda2ba1c18d7eb23dd524662eb9781ac48db819 Mon Sep 17 00:00:00 2001 From: Duc Nguyen Date: Sun, 28 Jul 2024 14:42:31 +0700 Subject: [PATCH] Replace io/util.ReadFile by os.ReadFile --- sarama/config_utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sarama/config_utils.go b/sarama/config_utils.go index 1f480a2..63eecde 100644 --- a/sarama/config_utils.go +++ b/sarama/config_utils.go @@ -5,8 +5,8 @@ import ( "crypto/x509" "errors" "github.com/IBM/sarama" - "io" "log" + "os" ) func GetConfig(brokers []string, algorithm *string, config *ClientConfig, conf sarama.Config) (*sarama.Config, error) { @@ -91,7 +91,7 @@ func CreateTLSConfig(c TLSConfig) (t *tls.Config) { if err != nil { log.Fatalf("%v", err) } - caCert, err := io.ReadFile(c.CaFile) + caCert, err := os.ReadFile(c.CaFile) if err != nil { log.Fatalf("%v", err) }