Documentation ¶
Index ¶
- func ClearDir(dir string) bool
- func CopyDir(source string, dest string) (err error)
- func CopyFile(srcName, dstName string) (written int64, err error)
- func DeleteFile(path string) bool
- func FixFilename(filename string) string
- func GetFileStrContent(path string) string
- func GetFilename(path string) string
- func GetFilesize(path string) int64
- func InArray(arr []string, str string) bool
- func InitEmail()
- func InitVd()
- func IsDirExists(path string) bool
- func IsEmail(email string) bool
- func IsFileExist(filename string) bool
- func IsGoodPwd(pwd string) (bool, string)
- func IsObjectId(id string) (ok bool)
- func IsUsername(username string) bool
- func L(i interface{})
- func LJ(i interface{})
- func ListDir(dir string) []string
- func Log(i interface{})
- func LogJ(i interface{})
- func Md5(s string) string
- func MkdirAll(dir string) bool
- func NewGuid() string
- func NewGuidWith(str string) string
- func PutFileStrContent(path, content string) bool
- func RandomPwd(num int) string
- func ReplaceAll(oldStr, pattern, newStr string) string
- func SendEmailOld(to, subject, body string) bool
- func SendToLeanoteOld(subject, title, body string)
- func SplitFilename(filename string) (baseName, ext string)
- func SubStringHTML(param string, length int, end string) string
- func SubStringHTMLToRaw(param string, length int) (result string)
- func Substr(str string, start, length int) string
- func Substring(str string, start int) string
- func SubstringByte(str string, start int) string
- func TransToGif(path string, maxWidth uint, afterDelete bool) (ok bool, transPath string)
- func TransferExt(path string, toExt string) string
- func Vd(name, value string) (ok bool, msg string)
- func Vds(m map[string]string) (ok bool, msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteFile ¶
func GetFilename ¶
func IsDirExists ¶
func IsFileExist ¶
func ReplaceAll ¶
截取含html的字符串
<div>
abcdef <p>xxxxxxxxxxx</p> <img src="" /> <div> abcdfef <p>aksdfjsld dfsadf --------------- 这里截断 </p> <p>xxxxxxxxxxxxxxx</p> abcdef </div>
</div> 那么只要在最后的html中添加</p></div></div>补全结束即可 思路: 1. 找到截断的位置 2. 去掉成对的标签 3. 去掉不要结束的标签 4. 补全标签
func SendEmailOld ¶
func SendToLeanoteOld ¶
func SendToLeanoteOld(subject, title, body string)
func TransToGif ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.