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