From a02435ba5c96782bfc66de0dc07e29a1bd54bf6e Mon Sep 17 00:00:00 2001 From: Chris kerr Date: Fri, 19 Jul 2024 22:08:27 -0400 Subject: [PATCH] remove deprecated code, rename file --- events/kind0.go | 2 +- utils/{utils.go => config.go} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename utils/{utils.go => config.go} (91%) diff --git a/events/kind0.go b/events/kind0.go index 32fabc1..ac15599 100644 --- a/events/kind0.go +++ b/events/kind0.go @@ -20,7 +20,7 @@ func HandleEventKind0(ctx context.Context, evt Event, collection *mongo.Collecti return err } - fmt.Println("Inserted event kind 1 into MongoDB:", evt.ID) + fmt.Println("Inserted event kind 0 into MongoDB:", evt.ID) return nil } diff --git a/utils/utils.go b/utils/config.go similarity index 91% rename from utils/utils.go rename to utils/config.go index 02219b6..9e00800 100644 --- a/utils/utils.go +++ b/utils/config.go @@ -1,7 +1,7 @@ package utils import ( - "io/ioutil" + "os" "gopkg.in/yaml.v2" ) @@ -21,7 +21,7 @@ type Config struct { } func LoadConfig(filename string) (*Config, error) { - data, err := ioutil.ReadFile(filename) + data, err := os.ReadFile(filename) if err != nil { return nil, err }