Create utils/base64.go
Browse files- internal/utils/base64.go +10 -0
internal/utils/base64.go
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
package utils
|
2 |
+
|
3 |
+
import (
|
4 |
+
"encoding/base64"
|
5 |
+
)
|
6 |
+
|
7 |
+
// Base64Decode 瑙g爜base64瀛楃涓蹭负瀛楄妭鏁扮粍
|
8 |
+
func Base64Decode(data string) ([]byte, error) {
|
9 |
+
return base64.StdEncoding.DecodeString(data)
|
10 |
+
}
|