dione/lib/net.go

9 lines
183 B
Go
Raw Normal View History

package lib
import "encoding/base64"
func BasicAuth(username, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}