func CheckProxyDB() {
	conn := NewStorage()
	x := conn.Count()
	log.Println("Before check, DB has:", x, "records.")
	ips, err := conn.GetAll()
	if err != nil {
		log.Println(err.Error())
		return
	}
	var wg sync.WaitGroup
	for _, v := range ips {
		wg.Add(1)
		go func(v *models.IP) {
			if !CheckIP(v) {
				ProxyDel(v)
			}
			wg.Done()
		}(v)
	}
	wg.Wait()
	x = conn.Count()
	log.Println("After check, DB has:", x, "records.")
}
CheckProxyDB to check the ip in DB
package storage
import (
	"log"
	"math/rand"
	"sync"
	"time"
	"github.com/clavinli/ProxyPool/models"
	"github.com/parnurzeal/gorequest"
)
func CheckProxy(ip *models.IP) {
	if CheckIP(ip) {
		ProxyAdd(ip)
	}
}
func CheckIP(ip *models.IP) bool {
	pollURL := "http://httpbin.org/get"
	resp, _, errs := gorequest.New().Proxy("http://" + ip.Data).Get(pollURL).End()
	if errs != nil {
		return false
	}
	if resp.StatusCode == 200 {
		return true
	}
	return false
}