Documentation ¶
Overview ¶
*************************************************************************** MIT License
Copyright (c) 2022 yjhi ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************
*************************************************************************** MIT License
Copyright (c) 2022 yjhi ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************
*************************************************************************** MIT License
Copyright (c) 2022 yjhi ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of t he Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************
*************************************************************************** MIT License
Copyright (c) 2022 yjhi ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************
Index ¶
- Variables
- func AesBase64Decode(data string, keystr string) (string, error)
- func AesBase64Encode(origstr string, keystr string) (string, error)
- func AppendToFile(file, err string)
- func CalcFileMD5(path string) (string, error)
- func CalcFileMd5(path string) (string, error)
- func Copy(a interface{}, b interface{}, skip []string) error
- func CopyFiled(a interface{}, b interface{}, skip []string) error
- func FileIsExists(filepath string) bool
- func Find(list []string, a string) bool
- func FromBase64(data string) (string, error)
- func InAInB(a []string, b []string) []string
- func InAnotB(a []string, b []string) []string
- func InitRandSeed()
- func MD5(content string) string
- func MakeAbsPath(path string, dir string)
- func Md5(content string) string
- func MkDir(path string)
- func NewGUID() string
- func NewGuid() string
- func NewRandMN(min int, max int) func() int
- func NewRandMN32(min int32, max int32) func() int32
- func NewRandMN64(min int64, max int64) func() int64
- func NewRandN(max int) func() int
- func NewRandN32(max int32) func() int32
- func NewRandN64(max int64) func() int64
- func ParseFileName(bfile string) (string, string)
- func ReadFileAll(path string) (string, error)
- func ReadFileLine(path string, fc func([]byte) bool) error
- func ReverseString(s string) string
- func Run(c string, p string) error
- func RunCmd(c string, p string) (error, string)
- func RunCmdWithErrEx(c string, p ...string) (error, string)
- func RunCommand(path string, args string) error
- func RunCommandResult(path string, args string) string
- func RunCommandWithErr(dir string, cmd string) (string, error)
- func RunCommandWithParam(path string, cmd string, args ...string) error
- func RunCommandWithParamAndResult(path string, cmd string, args ...string) string
- func RunEx(c string, p ...string) error
- func RunLinuxCmd(c string, p string) (error, string)
- func SHA1(data string) string
- func Sha1(data string) string
- func ToBase64(data string) string
- func WriteToFile(file, err string)
- type Encoding
- type IFileWriter
- type IntKeyUtils
- type RandStrUtil
- type StringKeyUtils
Constants ¶
This section is empty.
Variables ¶
var IsInitRandSeed bool = false
Functions ¶
func AesBase64Encode ¶
AES加密,CBC
func CalcFileMD5 ¶
func CalcFileMd5 ¶
func FileIsExists ¶
* * add by yjh 211124 * check fiel esists
func FromBase64 ¶
func InitRandSeed ¶
func InitRandSeed()
func NewRandMN32 ¶
func NewRandMN64 ¶
func NewRandN32 ¶
func NewRandN64 ¶
func ReadFileAll ¶
* * add by yjh 211124 * read file content
func ReverseString ¶
func RunCommand ¶
func RunCommandResult ¶
Types ¶
type Encoding ¶
type Encoding struct {
// contains filtered or unexported fields
}
func NewEncoding ¶
func NewEncoding() *Encoding
func (*Encoding) FromBase62 ¶
type IFileWriter ¶
type IFileWriter interface { Line(string) IFileWriter Lines([]string) IFileWriter Close() error }
a link writer for writing file
func NewFile ¶
func NewFile(file string) IFileWriter
type IntKeyUtils ¶
type IntKeyUtils struct {
// contains filtered or unexported fields
}
func BuildIntKey ¶
func BuildIntKey(keys []int) *IntKeyUtils
func (*IntKeyUtils) Find ¶
func (r *IntKeyUtils) Find(key int) bool
type RandStrUtil ¶
type RandStrUtil struct {
// contains filtered or unexported fields
}
func BuildRandStr ¶
func BuildRandStr(str string) *RandStrUtil
func (*RandStrUtil) Rand ¶
func (r *RandStrUtil) Rand(count int) string
make rand str in strmap add by yjh 211110
type StringKeyUtils ¶
type StringKeyUtils struct {
// contains filtered or unexported fields
}
func BuildStringKey ¶
func BuildStringKey(keys []string) *StringKeyUtils
func (*StringKeyUtils) Find ¶
func (r *StringKeyUtils) Find(key string) bool