func WebIP(ip string) func(*GoSpider) {
	return func(gs *GoSpider) {
		gs.web.IP = ip
	}
}
WebIP sets the bind IP of gospider server
package gospider
import (
	"log"
	"os"
	"strconv"
	"strings"
	"github.com/nange/gospider/web/core"
	"github.com/nange/gospider/common"
	"github.com/nange/gospider/web"
	"github.com/pkg/errors"
)
const (
	Name = "gospider"
	Version = "1.0.0"
)
type GoSpider struct {
	backend string
	mysql   common.MySQLConf
	web     *web.Server
}
func New(opts ...func(*GoSpider)) *GoSpider {
	gs := &GoSpider{}
	gs.init()
	for _, f := range opts {
		f(gs)
	}
	gs.parseSettingsFromEnv()
	return gs
}
func (gs *GoSpider) Run() error {
	gs.print()
	db, err := common.NewGormDB(gs.mysql)
	if err != nil {
		return errors.Wrap(err, "new gorm db failed")
	}
	core.SetGormDB(db)
	return errors.Wrap(gs.web.Run(), "web run failed")
}
func BackendMySQL() func(*GoSpider) {
	return func(gs *GoSpider) {
		gs.backend = "mysql"
	}
}
func BackendSQLite() func(*GoSpider) {
	return func(gs *GoSpider) {
		gs.backend = "sqlite"
	}
}
func MySQLHost(host string) func(*GoSpider) {
	return func(gs *GoSpider) {
		gs.mysql.Host = host
	}
}
func MySQLPort(port int) func(*GoSpider) {
	return func(gs *GoSpider) {
		gs.mysql.Port = port
	}
}
func MySQLUser(user string) func(*GoSpider) {
	return func(gs *GoSpider) {
		gs.mysql.User = user
	}
}
func MySQLPassword(password string) func(*GoSpider) {
	return func(gs *GoSpider) {
		gs.mysql.Password = password
	}
}
func MySQLDBName(dbname string) func(*GoSpider) {
	return func(gs *GoSpider) {
		gs.mysql.DBName = dbname
	}
}