Skip to content

Commit f8b4d05

Browse files
committed
chore: remove unused code
Signed-off-by: Patrik Cyvoct <[email protected]>
1 parent ddc0d09 commit f8b4d05

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

scaleway/helpers.go

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
package scaleway
22

33
import (
4-
"bytes"
54
"encoding/json"
65
"fmt"
76
"net"
87
"net/http"
98
"regexp"
109
"strings"
11-
"text/template"
1210
"time"
1311

14-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
1512
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
16-
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
1713
"github.com/scaleway/scaleway-sdk-go/namegenerator"
1814
"github.com/scaleway/scaleway-sdk-go/scw"
1915
"golang.org/x/xerrors"
@@ -302,37 +298,6 @@ func isUUID(s string) bool {
302298
return UUIDRegex.MatchString(s)
303299
}
304300

305-
// newTemplateFunc takes a go template string and returns a function that can be called to execute template.
306-
func newTemplateFunc(tplStr string) func(data interface{}) string {
307-
t := template.Must(template.New("tpl").Parse(tplStr))
308-
return func(tplParams interface{}) string {
309-
buffer := bytes.Buffer{}
310-
err := t.Execute(&buffer, tplParams)
311-
if err != nil {
312-
panic(err) // lintignore:R009
313-
}
314-
return buffer.String()
315-
}
316-
}
317-
318-
// testAccGetResourceAttr can be used in acceptance tests to extract value from state and store it in dest
319-
func testAccGetResourceAttr(resourceName string, attrName string, dest *string) resource.TestCheckFunc {
320-
return func(state *terraform.State) error {
321-
r, exist := state.RootModule().Resources[resourceName]
322-
if !exist {
323-
return fmt.Errorf("unknown ressource %s", resourceName)
324-
}
325-
326-
a, exist := r.Primary.Attributes[attrName]
327-
if !exist {
328-
return fmt.Errorf("unknown ressource %s", resourceName)
329-
}
330-
331-
*dest = a
332-
return nil
333-
}
334-
}
335-
336301
func flattenTime(date *time.Time) interface{} {
337302
if date != nil {
338303
return date.Format(time.RFC3339)

0 commit comments

Comments
 (0)