Documentation ¶
Index ¶
- Variables
- func Abs(n int64) int64
- func AsyncRunGroup(taskName string, namedJobs map[string]func())
- func AsyncRunWithTimeout(f func(), timeout time.Duration)
- func ByteToStringUnsafe(b []byte) string
- func Clone(from, to interface{}) error
- func CompilePatternWithJavaStyle(pattern string) (*regexp.Regexp, error)
- func Contain(code string, array []string) bool
- func ContainWithFunc(code string, array []CodeFunc) bool
- func Encode(charset string, context []byte) ([]byte, error)
- func GlobWithRecursive(pattern string) (matches []string, err error)
- func Is2xxSuccess(code int) bool
- func LineCount(r io.Reader) (int, error)
- func LineCount1(r io.Reader) (int, error)
- func LineCountTo(offset int64, fileName string) (int, error)
- func MatchGroup(pattern string, context string) (paramsMap map[string]string)
- func MatchGroupWithRegex(compRegEx *regexp.Regexp, context string) (paramsMap map[string]string)
- func MatchGroupWithRegexAndHeader(compRegEx *regexp.Regexp, context string, header map[string]interface{}) int
- func MatchWithRecursive(pattern, name string) (matched bool, err error)
- func MustCompilePatternWithJavaStyle(pattern string) *regexp.Regexp
- func SplitGlobPattern(p string) (base, pattern string)
- func StringToByteUnsafe(s string) []byte
- func WriteFileOrCreate(dir string, filename string, content []byte) error
- type CodeFunc
- type Matcher
Constants ¶
This section is empty.
Variables ¶
View Source
var AllEncodings = map[string]encoding.Encoding{ "nop": encoding.Nop, "plain": encoding.Nop, "utf-8": encoding.Nop, "gbk": simplifiedchinese.GBK, "gb18030": simplifiedchinese.GB18030, "hzgb2312": simplifiedchinese.HZGB2312, "big5": traditionalchinese.Big5, "euc-jp": japanese.EUCJP, "iso2022-jp": japanese.ISO2022JP, "shift-jis": japanese.ShiftJIS, "euc-kr": korean.EUCKR, "iso8859-6e": charmap.ISO8859_6E, "iso8859-6i": charmap.ISO8859_6I, "iso8859-8e": charmap.ISO8859_8E, "iso8859-8i": charmap.ISO8859_8I, "iso8859-1": charmap.ISO8859_1, "iso8859-2": charmap.ISO8859_2, "iso8859-3": charmap.ISO8859_3, "iso8859-4": charmap.ISO8859_4, "iso8859-5": charmap.ISO8859_5, "iso8859-6": charmap.ISO8859_6, "iso8859-7": charmap.ISO8859_7, "iso8859-8": charmap.ISO8859_8, "iso8859-9": charmap.ISO8859_9, "iso8859-10": charmap.ISO8859_10, "iso8859-13": charmap.ISO8859_13, "iso8859-14": charmap.ISO8859_14, "iso8859-15": charmap.ISO8859_15, "iso8859-16": charmap.ISO8859_16, "cp437": charmap.CodePage437, "cp850": charmap.CodePage850, "cp852": charmap.CodePage852, "cp855": charmap.CodePage855, "cp858": charmap.CodePage858, "cp860": charmap.CodePage860, "cp862": charmap.CodePage862, "cp863": charmap.CodePage863, "cp865": charmap.CodePage865, "cp866": charmap.CodePage866, "ebcdic-037": charmap.CodePage037, "ebcdic-1040": charmap.CodePage1140, "ebcdic-1047": charmap.CodePage1047, "koi8r": charmap.KOI8R, "koi8u": charmap.KOI8U, "macintosh": charmap.Macintosh, "macintosh-cyrillic": charmap.MacintoshCyrillic, "windows1250": charmap.Windows1250, "windows1251": charmap.Windows1251, "windows1252": charmap.Windows1252, "windows1253": charmap.Windows1253, "windows1254": charmap.Windows1254, "windows1255": charmap.Windows1255, "windows1256": charmap.Windows1256, "windows1257": charmap.Windows1257, "windows1258": charmap.Windows1258, "windows874": charmap.Windows874, "utf-16be-bom": unicode.UTF16(unicode.BigEndian, unicode.UseBOM), "utf-16le-bom": unicode.UTF16(unicode.LittleEndian, unicode.UseBOM), }
Functions ¶
func AsyncRunGroup ¶ added in v1.3.0
func AsyncRunWithTimeout ¶
func ByteToStringUnsafe ¶
func ContainWithFunc ¶
func GlobWithRecursive ¶
func Is2xxSuccess ¶ added in v1.5.0
func LineCount1 ¶
LineCount1 returns the number of file lines deprecated
func LineCountTo ¶
LineCountTo calculates the number of lines to the offset
func MatchGroupWithRegex ¶
func MatchGroupWithRegexAndHeader ¶ added in v1.3.0
func MatchWithRecursive ¶
func MustCompilePatternWithJavaStyle ¶ added in v1.3.0
func SplitGlobPattern ¶ added in v1.4.0
func StringToByteUnsafe ¶
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.