FileContent: tolerant base64 reader
This commit is contained in:
10
base64/base64.go
Normal file
10
base64/base64.go
Normal file
@ -0,0 +1,10 @@
|
||||
package base64
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func Decode(s string) ([]byte, error) {
|
||||
return base64.RawStdEncoding.DecodeString(strings.TrimRight(s, "="))
|
||||
}
|
||||
Reference in New Issue
Block a user