Skip to content

Commit dd211e0

Browse files
committed
lint
1 parent 4fa9a2f commit dd211e0

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

internal/services/ipam/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func NewAPIWithRegionAndID(m any, id string) (*ipam.API, scw.Region, string, err
4343
return ipamAPI, region, ID, err
4444
}
4545

46-
func diffSuppressFuncStandaloneIPandCIDR(_, oldValue, newValue string, _ *schema.ResourceData) bool {
46+
func DiffSuppressFuncStandaloneIPandCIDR(_, oldValue, newValue string, _ *schema.ResourceData) bool {
4747
parseIPOrCIDR := func(s string) net.IP {
4848
if ip, _, err := net.ParseCIDR(s); err == nil {
4949
return ip

internal/services/ipam/helpers_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
package ipam
1+
package ipam_test
22

33
import (
44
"testing"
5+
6+
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/ipam"
57
)
68

79
func TestDiffSuppress_IPAMIP(t *testing.T) {
@@ -75,7 +77,7 @@ func TestDiffSuppress_IPAMIP(t *testing.T) {
7577

7678
for _, tt := range tests {
7779
t.Run(tt.name, func(t *testing.T) {
78-
got := diffSuppressFuncStandaloneIPandCIDR("", tt.oldValue, tt.newValue, nil)
80+
got := ipam.DiffSuppressFuncStandaloneIPandCIDR("", tt.oldValue, tt.newValue, nil)
7981
if got != tt.want {
8082
t.Fatalf("diffSuppress(%q, %q) = %v, want %v", tt.oldValue, tt.newValue, got, tt.want)
8183
}

internal/services/ipam/ip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func ResourceIP() *schema.Resource {
3838
ForceNew: true,
3939
Description: "Request a specific IP in the requested source pool",
4040
ValidateFunc: validation.IsIPAddress,
41-
DiffSuppressFunc: diffSuppressFuncStandaloneIPandCIDR,
41+
DiffSuppressFunc: DiffSuppressFuncStandaloneIPandCIDR,
4242
},
4343
"source": {
4444
Type: schema.TypeList,

0 commit comments

Comments
 (0)