Skip to content

Commit 33a6851

Browse files
authored
Add type for consts
1 parent 96188fe commit 33a6851

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

pkg/porkbun/api.go

+4-10
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99

1010
// https://porkbun.com/api/json/v3/documentation
1111
const (
12-
PING = "https://porkbun.com/api/json/v3/ping"
13-
GET = "https://porkbun.com/api/json/v3/dns/retrieve"
14-
CREATE = "https://porkbun.com/api/json/v3/dns/create"
15-
DELETE = "https://porkbun.com/api/json/v3/dns/delete"
12+
PING string = "https://porkbun.com/api/json/v3/ping"
13+
GET string = "https://porkbun.com/api/json/v3/dns/retrieve"
14+
CREATE string = "https://porkbun.com/api/json/v3/dns/create"
15+
DELETE string = "https://porkbun.com/api/json/v3/dns/delete"
1616
)
1717

1818
type checkable interface {
@@ -134,12 +134,6 @@ func createFromPorkbunRecord(auth PorkAuth, domain string, porkRecord PorkbunRec
134134
return fmt.Sprint(created.Id), nil
135135
}
136136

137-
func createFromClientRecord(auth PorkAuth, domain string, record client.Record) (string, error) {
138-
porkRecord := ConvertToPorkbunRecord(record)
139-
140-
return createFromPorkbunRecord(auth, domain, porkRecord)
141-
}
142-
143137
func delete(auth PorkAuth, domain string, id string) error {
144138
body, err := helpers.PostJsonAndRead(DELETE+"/"+domain+"/"+id, auth)
145139
if err != nil {

0 commit comments

Comments
 (0)