mirror of
https://github.com/alibaba/higress.git
synced 2026-03-10 03:30:48 +08:00
9 lines
201 B
Go
9 lines
201 B
Go
package util
|
|
|
|
import re "regexp"
|
|
|
|
// 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)
|
|
}
|