Skip to content

Commit 6bc2c2d

Browse files
committed
refactor: apply fixes to make linter happy
1 parent d14eb81 commit 6bc2c2d

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

internal/provider/alerts_resource.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"strconv"
88
"strings"
99
"time"
10-
1110
"github.com/hashicorp/terraform-plugin-framework/path"
1211
"github.com/hashicorp/terraform-plugin-framework/resource"
1312
rschema "github.com/hashicorp/terraform-plugin-framework/resource/schema"
@@ -183,7 +182,7 @@ func iso8601ToDuration(s string) (time.Duration, error) {
183182
if err != nil {
184183
return 0, err
185184
}
186-
min, err := parse(m[3])
185+
minutes, err := parse(m[3])
187186
if err != nil {
188187
return 0, err
189188
}

internal/provider/channels_resource.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"fmt"
66
"strings"
7-
87
"github.com/hashicorp/terraform-plugin-framework/path"
98
"github.com/hashicorp/terraform-plugin-framework/resource"
109
rschema "github.com/hashicorp/terraform-plugin-framework/resource/schema"

internal/provider/client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ func (c *APIClient) doJSON(ctx context.Context, method, path string, in any, out
6363

6464
defer func() {
6565
if out == nil {
66-
io.Copy(io.Discard, resp.Body)
66+
if _, err := io.Copy(io.Discard, resp.Body); err != nil {
67+
fmt.Printf("error discarding response body: %v\n", err)
68+
}
6769
}
6870
}()
6971

internal/provider/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/hashicorp/terraform-plugin-framework/types"
1414
)
1515

16-
// Interface assertions
16+
// Interface assertions.
1717
var _ provider.Provider = &LogfireProvider{}
1818

1919
func New(version string) func() provider.Provider {

0 commit comments

Comments
 (0)