gf/.example/encoding/gbase64.go

17 lines
201 B
Go
Raw Normal View History

package main
import (
2019-04-03 00:03:46 +08:00
"fmt"
2019-07-29 21:01:19 +08:00
"github.com/gogf/gf/encoding/gbase64"
)
func main() {
2019-04-03 00:03:46 +08:00
s := "john"
b := gbase64.Encode(s)
c, e := gbase64.Decode(b)
fmt.Println(b)
fmt.Println(c)
fmt.Println(e)
}