Removing print, adding gitignore
This commit is contained in:
parent
6d95a6639f
commit
fdda8b8a6d
2 changed files with 1 additions and 1 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ddns
|
||||||
1
ddns.go
1
ddns.go
|
|
@ -59,7 +59,6 @@ func getRecord() Record {
|
||||||
|
|
||||||
func updateRecord(ipAddr string) {
|
func updateRecord(ipAddr string) {
|
||||||
body := strings.NewReader(fmt.Sprintf("{\"secretapikey\": \"%s\", \"apikey\": \"%s\", \"content\": \"%s\", \"ttl\": \"600\"}", os.Getenv(secretKey), os.Getenv(apiKey), ipAddr))
|
body := strings.NewReader(fmt.Sprintf("{\"secretapikey\": \"%s\", \"apikey\": \"%s\", \"content\": \"%s\", \"ttl\": \"600\"}", os.Getenv(secretKey), os.Getenv(apiKey), ipAddr))
|
||||||
fmt.Println(body)
|
|
||||||
|
|
||||||
resp, err := http.Post(updateUrl, "application/json", body)
|
resp, err := http.Post(updateUrl, "application/json", body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue