From 59aef10b76ce53d631e51dfc34f36e0c4edbca3d Mon Sep 17 00:00:00 2001 From: Parth Gohil <138430690+parthpnx@users.noreply.github.com> Date: Thu, 12 Sep 2024 09:10:04 +0530 Subject: [PATCH] fix: Linting --- internal/provider/log_anomaly/create.go | 2 +- internal/provider/log_anomaly/read.go | 2 +- internal/provider/log_anomaly/transform/transform.go | 8 ++++---- internal/provider/log_anomaly/update.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/provider/log_anomaly/create.go b/internal/provider/log_anomaly/create.go index 10d63be..717fae7 100644 --- a/internal/provider/log_anomaly/create.go +++ b/internal/provider/log_anomaly/create.go @@ -18,7 +18,7 @@ func Create(d *schema.ResourceData, m interface{}) error { logGroup = d.Get(LogGroup).(string) ) - evaluationFrequency, err := transform.ToApiValue(d.Get(EvaluationFrequency).(string)) + evaluationFrequency, err := transform.ToAPIValue(d.Get(EvaluationFrequency).(string)) if err != nil { return err diff --git a/internal/provider/log_anomaly/read.go b/internal/provider/log_anomaly/read.go index a0c0665..68075cb 100644 --- a/internal/provider/log_anomaly/read.go +++ b/internal/provider/log_anomaly/read.go @@ -21,7 +21,7 @@ func Read(d *schema.ResourceData, m interface{}) error { return errors.Wrap(err, "failed to get ID") } - frequency, err := transform.FromApiValue(*obj.EvaluationFrequency) + frequency, err := transform.FromAPIValue(*obj.EvaluationFrequency) if err != nil { return err } diff --git a/internal/provider/log_anomaly/transform/transform.go b/internal/provider/log_anomaly/transform/transform.go index 8bb5580..6132839 100644 --- a/internal/provider/log_anomaly/transform/transform.go +++ b/internal/provider/log_anomaly/transform/transform.go @@ -2,8 +2,8 @@ package transform import "fmt" -// GetEvaluationFrequency returns the evaluation frequency. -func ToApiValue(evaluationFrequency string) (string, error) { +// ToApiValue returns the evaluation frequency. +func ToAPIValue(evaluationFrequency string) (string, error) { switch evaluationFrequency { case "5": @@ -23,8 +23,8 @@ func ToApiValue(evaluationFrequency string) (string, error) { } } -// transformEvaluationFrequency returns the evaluation frequency. -func FromApiValue(evaluationFrequency string) (string, error) { +// FromApiValue returns the evaluation frequency. +func FromAPIValue(evaluationFrequency string) (string, error) { switch evaluationFrequency { case "FIVE_MIN": diff --git a/internal/provider/log_anomaly/update.go b/internal/provider/log_anomaly/update.go index 0e7373e..3081d07 100644 --- a/internal/provider/log_anomaly/update.go +++ b/internal/provider/log_anomaly/update.go @@ -14,7 +14,7 @@ func Update(d *schema.ResourceData, m interface{}) error { c := cloudwatchlogs.New(sess) - evaluationFrequency, err := transform.ToApiValue(d.Get(EvaluationFrequency).(string)) + evaluationFrequency, err := transform.ToAPIValue(d.Get(EvaluationFrequency).(string)) if err != nil { return err