10 lines
230 B
Go
10 lines
230 B
Go
package helpers
|
|
|
|
import "encoding/base64"
|
|
|
|
// Provides a BasicAuth string
|
|
func BasicAuth(username, password string) string {
|
|
authString := username + ":" + password
|
|
return base64.StdEncoding.EncodeToString([]byte(authString))
|
|
}
|