func BasicAuthEncode(key, secret string) string {
    token := key + ":" + secret
    return base64.StdEncoding.EncodeToString([]byte(token))
}
BasicAuthEncode encodes a key-secret pair to be used in a HTTP Basic Authentication
strategy (HTTP Request Header)
package utils
import (
    "encoding/base64"
    "strings"
)