mirror of
https://github.com/fumiama/go-nd-portal.git
synced 2026-06-10 03:28:08 +08:00
16 lines
277 B
Go
16 lines
277 B
Go
package base64
|
|
|
|
import (
|
|
b64 "encoding/base64"
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestBase64(t *testing.T) {
|
|
buf := strings.Builder{}
|
|
b64.NewEncoder(Base64Encoding, &buf).Write([]byte("123456"))
|
|
assert.Equal(t, "9F2z0JHI", buf.String())
|
|
}
|