Documentation ¶
Index ¶
- Constants
- Variables
- func AppendString(filename, content string) error
- func Base64Encode(braw []byte) []byte
- func Between(v1, o1, v, o2, v2 string) bool
- func BufferWriteAppend(filename string, param string) error
- func Compare(v1, operator, v2 string) bool
- func CreateRandomString(len int) string
- func Exists(path string) bool
- func GetNowDate() string
- func GetNowDateTime() string
- func GetNowDateTimeReportName() string
- func GetNumberText(number int) string
- func GetRandomIntWithAll(min, max int) int
- func GetRandomIntWithMin(min, max int) int
- func GetRandomTips() string
- func HexDecode(s string) []byte
- func HexEncode(s string) []byte
- func IsBlank(value string) bool
- func IsDir(path string) bool
- func IsNotBlank(value string) bool
- func IsSeverityMatchingCvssScore(severity string, score float64) string
- func IsURL(input string) bool
- func Mmh3Hash32(raw []byte) int32
- func OpenFile(fileName string) *os.File
- func ParseUrl(u *url.URL) *proto.UrlType
- func RandFromChoices(n int, choices string) string
- func RandLetterNumbers(n int) string
- func RandLetters(n int) string
- func RandLowLetterNumber(n int) string
- func RandSleep(millisencond int)
- func RandomStr(randSource *rand.Rand, letterBytes string, n int) string
- func RandomUA() string
- func ReadFileLineByLine(filename string) ([]string, error)
- func ReadFromFile(filename string) ([]byte, error)
- func ReadFromPathOrURL(templatePath string) (data []byte, err error)
- func ReverseString(s string) string
- func Str2UTF8(str string) string
- func StringSliceContains(slice []string, item string) bool
- func Tcp(addr string, data []byte) ([]byte, error)
- func ToString(slice []string) string
- func UrlTypeToString(u *proto.UrlType) string
- func WriteFile(filename string, data []byte) error
- type Severity
- type StringSlice
- type Syncfile
- type Unzip
Constants ¶
View Source
const (
NEW_FILE_PERM = 0666
)
Variables ¶
Functions ¶
func AppendString ¶
AppendString appends the contents of the string to filename.
func BufferWriteAppend ¶
func CreateRandomString ¶
func GetNowDate ¶
func GetNowDate() string
func GetNowDateTime ¶
func GetNowDateTime() string
func GetNowDateTimeReportName ¶
func GetNowDateTimeReportName() string
func GetNumberText ¶
func GetRandomTips ¶
func GetRandomTips() string
func IsNotBlank ¶
func RandFromChoices ¶
RandFromChoices 从choices里面随机获取
func ReadFileLineByLine ¶
func ReadFromFile ¶
func ReadFromPathOrURL ¶
ReadFromPathOrURL reads and returns the contents of a file or url.
func ReverseString ¶
func StringSliceContains ¶
StringSliceContains checks if a string slice contains a string.
func UrlTypeToString ¶
Types ¶
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings
func (StringSlice) GetKey ¶
func (stringSlice StringSlice) GetKey(value string) int
func (StringSlice) Modify ¶
func (stringSlice StringSlice) Modify(value string)
func (*StringSlice) Set ¶
func (stringSlice *StringSlice) Set(value string)
Set appends a value to the string slice.
func (StringSlice) String ¶
func (stringSlice StringSlice) String() string
type Syncfile ¶
func NewSyncfile ¶
Click to show internal directories.
Click to hide internal directories.