func Config(fullProduct string) (settings Settings) {
	return config(fullProduct, "", nil)
}
Config gathers configuration from env variables and json config files.
Examples of fullProduct are "iron_worker", "iron_cache", "iron_mq".
package config
import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"runtime"
	"strconv"
	"strings"
)
type Settings struct {
	Token      string `json:"token,omitempty"`
	ProjectId  string `json:"project_id,omitempty"`
	Host       string `json:"host,omitempty"`
	Scheme     string `json:"scheme,omitempty"`
	Port       uint16 `json:"port,omitempty"`
	ApiVersion string `json:"api_version,omitempty"`
	UserAgent  string `json:"user_agent,omitempty"`
}
var (
	debug     = false
	goVersion = runtime.Version()
	Presets   = map[string]Settings{
		"worker": Settings{
			Scheme:     "https",
			Port:       443,
			ApiVersion: "2",
			Host:       "worker-aws-us-east-1.iron.io",
			UserAgent:  "iron_go/worker 2.0 (Go " + goVersion + ")",
		},
		"mq": Settings{
			Scheme:     "https",
			Port:       443,
			ApiVersion: "1",
			Host:       "mq-aws-us-east-1.iron.io",
			UserAgent:  "iron_go/mq 1.0 (Go " + goVersion + ")",
		},
		"cache": Settings{
			Scheme:     "https",
			Port:       443,
			ApiVersion: "1",
			Host:       "cache-aws-us-east-1.iron.io",
			UserAgent:  "iron_go/cache 1.0 (Go " + goVersion + ")",
		},
	}
)
func dbg(v ...interface{}) {
	if debug {
		fmt.Fprintln(os.Stderr, v...)
	}
}
func ManualConfig(fullProduct string, configuration *Settings) (settings Settings) {
	return config(fullProduct, "", configuration)
}