func GetConfigInt(name string) int {
	val := os.Getenv("OBCCA_"+strings.Replace(strings.ToUpper(name), ".", "_", -1))
	if val == "" {
		return viper.GetInt(name)
	}
	ival, _ := strconv.Atoi(val)
	return ival
}
GetConfigInt returns a configuration integer value for a given identifier.
Environment variables have preference over entries in the yaml file, whereby 'name' is
converted to

"OBCCA_" + strings.Replace(strings.ToUpper('name'), ".", "_")

for environment variables.
package obcca
import (
	"bytes"
	"crypto/aes"
	"crypto/cipher"
	crand "crypto/rand"
	"errors"
	"io"
	"log"
	mrand "math/rand"
	"os"
	"strconv"
	"strings"
	"time"
	"github.com/spf13/viper"
)
const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
const (
	letterIdxBits = 6                     
	letterIdxMask = 1<<letterIdxBits - 1  
	letterIdxMax  = 63 / letterIdxBits    
)
var (
	Trace *log.Logger
	Info *log.Logger
	Warning *log.Logger
	Error *log.Logger
	Panic *log.Logger
)
func LogInit(trace, info, warning, error, panic io.Writer) {
	Trace = log.New(trace, "TRACE: ", log.LstdFlags|log.Lshortfile)
	Info = log.New(info, "INFO: ", log.LstdFlags)
	Warning = log.New(warning, "WARNING: ", log.LstdFlags|log.Lshortfile)
	Error = log.New(error, "ERROR: ", log.LstdFlags|log.Lshortfile)
	Panic = log.New(panic, "PANIC: ", log.LstdFlags|log.Lshortfile)
}
var rnd = mrand.NewSource(time.Now().UnixNano())
func randomString(n int) string {
	b := make([]byte, n)
	for i, cache, remain := n-1, rnd.Int63(), letterIdxMax; i >= 0; {
		if remain == 0 {
			cache, remain = rnd.Int63(), letterIdxMax
		}
		if idx := int(cache & letterIdxMask); idx < len(letterBytes) {
			b[i] = letterBytes[idx]
			i--
		}
		cache >>= letterIdxBits
		remain--
	}
	return string(b)
}
func GetConfigString(name string) string {
	val := os.Getenv("OBCCA_"+strings.Replace(strings.ToUpper(name), ".", "_", -1))
	if val == "" {
		return viper.GetString(name)
	}
	return val
}