mirror of
https://github.com/nitezs/sub2clash.git
synced 2024-12-24 23:14:42 -05:00
14 lines
217 B
Go
14 lines
217 B
Go
|
package parser
|
||
|
|
||
|
import (
|
||
|
"encoding/base64"
|
||
|
)
|
||
|
|
||
|
func DecodeBase64(s string) (string, error) {
|
||
|
decodeStr, err := base64.StdEncoding.DecodeString(s)
|
||
|
if err != nil {
|
||
|
return "", err
|
||
|
}
|
||
|
return string(decodeStr), nil
|
||
|
}
|