You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simpleRequest/test/base64_test.go

22 lines
343 B
Go

/*
* @FileName: base64_test.go
* @Author: JuneXu
* @CreateTime: 2022/3/24 12:03
* @Description:
*/
package test
import (
"encoding/base64"
"fmt"
"testing"
)
func TestBs(t *testing.T) {
authStr := fmt.Sprintf("%v:%v", "aaa", "bbb")
data := base64.StdEncoding.EncodeToString([]byte(authStr))
t.Log(data)
} //YWFhOmJiYg==