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