Documentation ¶
Overview ¶
Copyright 2017 by GoSpider author. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 by GoSpider author. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func Base64D(urlxxstring string) string
- func Base64E(urlstring string) string
- func ComputeHmac256(message string, secret string) string
- func CopyFF(src io.Reader, dst io.Writer) error
- func CopyFS(src io.Reader, dst string) error
- func CurDir() string
- func DevideStringList(files []string, num int) (map[int][]string, error)
- func FileExist(filename string) bool
- func FileStatus(filepath string)
- func GetBinaryCurrentPath() (string, error)
- func GetCurrentPath() (string, error)
- func GetDateTimes2Secord(datestring string) int64
- func GetFileSuffix(f string) string
- func GetFilenameInfo(filepath string) (os.FileInfo, error)
- func GetSecord2DateTimes(secord int64) string
- func GetSecordTimes() int64
- func HasFile(s string) bool
- func IS(i int) string
- func InArray(sa []string, a string) bool
- func Input(say, defaults string) string
- func IsDir(filepath string) bool
- func IsFile(filepath string) bool
- func JsonBack(s []byte) ([]byte, error)
- func JsonEncode(raw string) string
- func ListDir(dirPth string, suffix string) (files []string, err error)
- func MakeDir(filedir string) error
- func MakeDirByFile(filepath string) error
- func Md5(str string) string
- func ReadfromFile(filepath string) ([]byte, error)
- func Rename(oldfilename string, newfilename string) error
- func SI(s string) (i int, e error)
- func SaveToFile(filepath string, content []byte) error
- func Second(times int) time.Duration
- func SizeofDir(dirPth string) int
- func Sleep(waittime int)
- func StringsToJson(str string) string
- func Strtomd5(s string) string
- func Substr(str string, start, length int) string
- func ToLower(s string) string
- func TodayString(level int) string
- func UrlD(s string) string
- func UrlE(s string) string
- func ValidBackFileName(filename string) string
- func ValidFileName(filename string) string
- func WalkDir(dirPth, suffix string) (files []string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeHmac256 ¶
HMAC with the SHA256 http://blog.csdn.net/js_sky/article/details/49024959
func DevideStringList ¶
change by python
func GetDateTimes2Secord ¶
func MakeDirByFile ¶
根据传入文件名,递归创建文件夹 ./dir/filename /home/dir/filename Create dir by the filename
func SaveToFile ¶
将字节数组保存到文件中去 Save bytes into file
func TodayString ¶
func ValidBackFileName ¶
func ValidFileName ¶
# 去除标题中的非法字符 (Windows) def validateTitle(title): rstr = r"[\/\\\:\*\?\"\<\>\|]" # '/\:*?"<>|' new_title = re.sub(rstr, "", title) return new_title
Types ¶
This section is empty.