Skip to content

Commit c369f5b

Browse files
committed
fix: remove fmt.Sprintf from tflog call, use static message
Address review feedback: use static log message string instead of fmt.Sprintf inside tflog.Info. Remove now-unused "fmt" import.
1 parent 91ba982 commit c369f5b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

github/resource_github_actions_environment_variable.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package github
33
import (
44
"context"
55
"errors"
6-
"fmt"
76
"net/http"
87
"net/url"
98

@@ -141,9 +140,9 @@ func resourceGithubActionsEnvironmentVariableRead(ctx context.Context, d *schema
141140
var ghErr *github.ErrorResponse
142141
if errors.As(err, &ghErr) {
143142
if ghErr.Response.StatusCode == http.StatusNotFound {
144-
tflog.Info(ctx, fmt.Sprintf("Removing actions variable %s from state because it no longer exists in GitHub", d.Id()), map[string]any{
145-
"variable_id": d.Id(),
146-
})
143+
tflog.Info(ctx, "Removing actions variable from state because it no longer exists in GitHub", map[string]any{
144+
"variable_id": d.Id(),
145+
})
147146
d.SetId("")
148147
return nil
149148
}

0 commit comments

Comments
 (0)