mirror of
https://github.com/alibaba/higress.git
synced 2026-03-07 10:00:48 +08:00
9 lines
221 B
Go
9 lines
221 B
Go
package util
|
|
|
|
import re "github.com/wasilibs/go-re2"
|
|
|
|
// IsValidBase64 checks if a string is a valid base64 encoded string
|
|
func IsValidBase64(s string) bool {
|
|
return re.MustCompile(`^[a-zA-Z0-9+/=-]+$`).MatchString(s)
|
|
}
|