Пример #1
0
func NewRamRequest() *ramRequest {
	data := new(ramRequest)

	if config, err := gofig.Load("./gofig.json"); err == nil {
		data.Phone, _ = config.Str("businesPhone")
		data.Email, _ = config.Str("email")
		data.Cell, _ = config.Str("businessCell")
		data.Fax, _ = config.Str("businessFax")
	}

	return data
}
func (configuration *Configuration) Load() {
	if conf, err := gofig.Load("./gofig.json"); err == nil {
		configuration.MinAtBats, _ = conf.Int64("minAtBats")
		configuration.AMaxAge, _ = conf.Int64("amaxAge")
		configuration.AAMaxAge, _ = conf.Int64("aamaxAge")
		configuration.AAAMaxAge, _ = conf.Int64("aaamaxAge")
		configuration.MinStars, _ = conf.Int64("minStars")
		configuration.MedianwOBP, _ = conf.Float("medianwOBP")
		configuration.MinWAR, _ = conf.Float("minWAR")
		configuration.GoodWAR, _ = conf.Float("goodWAR")
		configuration.BottomwOBP, _ = conf.Float("bottomwOBP")
		configuration.TopwOBP, _ = conf.Float("topwOBP")
	}
}