mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-11-25 19:37:41 +08:00
19 lines
253 B
Go
19 lines
253 B
Go
|
|
package baidu
|
||
|
|
|
||
|
|
import (
|
||
|
|
"net/url"
|
||
|
|
"strings"
|
||
|
|
"time"
|
||
|
|
)
|
||
|
|
|
||
|
|
func getTime(t int64) *time.Time {
|
||
|
|
tm := time.Unix(t, 0)
|
||
|
|
return &tm
|
||
|
|
}
|
||
|
|
|
||
|
|
func encodeURIComponent(str string) string {
|
||
|
|
r := url.QueryEscape(str)
|
||
|
|
r = strings.ReplaceAll(r, "+", "%20")
|
||
|
|
return r
|
||
|
|
}
|