1
0
mirror of https://github.com/taigrr/godns synced 2025-01-18 04:03:25 -08:00
godns/godns.go
2014-05-13 13:08:43 +08:00

44 lines
635 B
Go

package main
import (
"fmt"
"os"
"time"
)
var Configuration Settings
func main() {
fmt.Println("Starting...")
Configuration = LoadSettings()
loop := make(chan bool)
go dns_loop(loop)
ret := <-loop
if !ret {
fmt.Println("Dns loop exited...")
close(loop)
os.Exit(1)
}
}
func dns_loop(loop chan bool) {
fmt.Println("Inside the loop...")
time.Sleep(time.Second * 2)
// currentIP, _ := get_currentIP(Configuration.IP_Url)
// fmt.Println("Current IP is" + currentIP)
//Continue to check the IP of sub-domain
// if len(currentIP) > 0 {
get_domain(Configuration.Domain)
// }
api_version()
loop <- false
}