Documentation
¶
Index ¶
- func CopyFile(source string, dest string) (bool, error)
- func FileExists(filename string) bool
- func FileExt(filename string) string
- func FileMTime(filename string) (int64, error)
- func FileSize(filename string) (int64, error)
- func HumanTime(timestamp int64) string
- func IsAvailable(name string, data interface{}) bool
- func IsDir(filename string) bool
- func IsFile(filename string) bool
- func IsReadable(filename string) bool
- func IsWriteable(filename string) bool
- func PasswordHash(password string) (string, error)
- func PasswordVerify(password, hash string) bool
- func PureHtmlContent(html string) (content string)
- func RenameFile(oldName, newName string) error
- func Str2Datetime(datetime string) string
- func Str2HumanTime(datetime string) string
- func Str2UnixTime(datetime string) int64
- func TimeAgo(t time.Time) string
- func Unescaped(x string) interface{}
- func UnixTime() int64
- func UnixTime2Date(timestamp int64) string
- func UnixTime2DateTime(timestamp int64) string
- func UnlinkFile(filename string) error
- func ValidateBaseURI(baseURI string, redirectURI string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
FileExists : Checks whether a file or directory exists 如果由 filename 指定的文件或目录 存在则返回 true,否则返回 false
func PasswordHash ¶
PasswordHash Creates a password hash 密码加密: 同PHP函数 password_hash()
func PasswordVerify ¶
PasswordVerify : Verifies that a password matches a hash 加密密码验证: 同PHP函数 password_verify()
func PureHtmlContent ¶
PureHtmlContent 获取 HTML 标签中的纯文本
func RenameFile ¶
RenameFile rename(): Renames a file or directory
func UnixTime2Date ¶
UnixTime2Date 时间戳转成 datetime 字符串 YY-mm-dd
func UnixTime2DateTime ¶
UnixTime2DateTime 时间戳转成 datetime 字符串 YY-mm-dd HH:ii:ss
func ValidateBaseURI ¶
验证跳转域名的合法性:即跳转链接的域名 应该包含 baseURI 的域名 ValidateBaseURI validates that redirectURI is contained in baseURI
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.