Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
louy committed Jun 4, 2018
1 parent e3c0c4f commit 39fd12e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 59 deletions.
8 changes: 0 additions & 8 deletions uptimerobot/api/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,3 @@ func intToString(m map[string]int, value int) string {
}
return ""
}

func Map(vs []interface{}, f func(interface{}) string) []string {
vsm := make([]string, len(vs))
for i, v := range vs {
vsm[i] = f(v)
}
return vsm
}
3 changes: 3 additions & 0 deletions uptimerobot/api/status_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ var statusPageStatus = map[string]int{
"paused": 0,
"active": 1,
}
var StatusPageStatus = mapKeys(statusPageStatus)

var statusPageSort = map[string]int{
"a-z": 1,
"z-a": 2,
"up-down-paused": 3,
"down-up-paused": 4,
}
var StatusPageSort = mapKeys(statusPageSort)

type StatusPage struct {
ID int
Expand Down
38 changes: 0 additions & 38 deletions uptimerobot/helpers.go

This file was deleted.

15 changes: 2 additions & 13 deletions uptimerobot/resource_uptimerobot_status_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ import (
"github.com/louy/terraform-provider-uptimerobot/uptimerobot/api"
)

var statusPageStatus = map[string]int{
"paused": 0,
"active": 1,
}
var statusPageSort = map[string]int{
"a-z": 1,
"z-a": 2,
"up-down-paused": 3,
"down-up-paused": 4,
}

func resourceStatusPage() *schema.Resource {
return &schema.Resource{
Create: resourceStatusPageCreate,
Expand Down Expand Up @@ -48,13 +37,13 @@ func resourceStatusPage() *schema.Resource {
"sort": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice(mapKeys(statusPageSort), false),
ValidateFunc: validation.StringInSlice(uptimerobotapi.StatusPageSort, false),
Default: "a-z",
},
"status": &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice(mapKeys(statusPageStatus), false),
ValidateFunc: validation.StringInSlice(uptimerobotapi.StatusPageStatus, false),
Default: "active",
},
"monitors": &schema.Schema{
Expand Down

0 comments on commit 39fd12e

Please sign in to comment.