Documentation
¶
Index ¶
- Constants
- Variables
- func AlignString(s string, length int) (ss string)
- func Atoi(s string) int
- func BaseName(path string) string
- func CheckLoopvarAndNilPoint()
- func Concat[S ~[]E, E any](slices_ ...S) S
- func ConvertUtf82Gbk(src string) (ss string)
- func CopyDir(dst, src string) error
- func CreatDirectory(dir string) bool
- func CurrentDirName(path string) (currentDirName string)
- func CutUint16(u uint16) uint8
- func CutUint16_(u uint16) uint8
- func DirDepth(dirPath string) (depth int)
- func FileExists(path string) bool
- func FixUncPath(path string) string
- func Float64Cut(value float64, bits int) (float64, error)
- func Float64ToString(f float64, prec int) string
- func FormatDuration(d time.Duration) string
- func FormatTime(t time.Time) string
- func Gbk2Utf8(gbk string) (utf8 string)
- func GenXiLa26() (letters []string)
- func GenerateRandomNumber(max int) int
- func GetDiffDays(dstTime string) string
- func GetPackageName() (pkgName string)
- func GetTimeNowString() string
- func GetTimeStamp() string
- func GetTimeStamp13Bits() int64
- func GetUserConfigDirs() (UserConfigDirs map[string]string, err error)
- func GitProxy(isSetProxy bool)
- func HomeDir() string
- func IntegerToIP(ip int64) string
- func IsAix() bool
- func IsAndroid() bool
- func IsDarwin() bool
- func IsDir(path string) bool
- func IsDirRoot(path string) bool
- func IsDragonfly() bool
- func IsFilePath(input string) bool
- func IsFreebsd() bool
- func IsHurd() bool
- func IsIllumos() bool
- func IsIos() bool
- func IsJs() bool
- func IsLinux() bool
- func IsNacl() bool
- func IsNetbsd() bool
- func IsOpenbsd() bool
- func IsPlan9() bool
- func IsSolaris() bool
- func IsTermux() bool
- func IsWasip1() bool
- func IsWindows() bool
- func IsZero(v reflect.Value) bool
- func IsZos() bool
- func JoinHomeDir(path string) (join string)
- func JoinHomeFile(path string) (join string)
- func JsonIndent(b []byte) string
- func Lines(x []byte) []string
- func MakeArg(arg ...string) string
- func MarshalJSON(v any) []byte
- func MarshalJsonToFile(v any, name string)
- func MoveFile(src, dst string) (err error)
- func NewVersion[T string | uint64](s ...T) (v *object)
- func ParseFloat(sizeStr string) (size float64)
- func ParseInt(s string) int64
- func ParseUint(s string) uint64
- func RandomNum(min, max int) int
- func ReadEmbedFilesToMap(embedFiles embed.FS, dirname string) *maps.SafeMap[string, []byte]
- func ReadFileAndWriteTruncate(path, dstPath string)
- func ReadFileSubTimeWithCallBack(title, path string, callBack func(string))
- func ReadFileToLines(path string) (lines []string)
- func ReadLines(fullpath string) ([]string, error)
- func RegexpWebBodyBlocks(tagName string) string
- func RunDir() string
- func RunDirAbs() string
- func SerialNumber(b string) string
- func SetNameAndEmail(s *Buffer)
- func SetProxy(s *Buffer, isSetProxy bool)
- func SetSafecrlf(s *Buffer)
- func SlicesIndex(slice any, item any) int
- func SlicesInsert(slice any, index int, value any) any
- func SplitFileByLines(filePath string, size int)
- func SubStrRunes(s string, length int) string
- func SwapBytes(src []byte) (dst []byte)
- func SwapBytes2HexString2(src HexString) (dst string)
- func ToCamel(data string, isCommit bool) string
- func ToCamelToLower(s string, isCommit bool) string
- func ToCamelUpper(s string, isCommit bool) string
- func ToLines[T string | []byte | *os.File | *bytes.Buffer](data T) (lines []string)
- func TrimExtension(path string) string
- func UnFormatDuration(s string) time.Duration
- func UnFormatTime(s string) time.Time
- func Unquote(line string) string
- func UpdateModsByWorkSpace(isTidy, isUpdateAll bool, modWithCommitID ...string)
- func Utf82Gbk(utf8 string) (gbk string)
- func WriteAppend[T Type](name string, data T)
- func WriteBinaryFile[T Type](name string, data T)
- func WriteGoFile[T Type](name string, data T)
- func WriteLines(lines []string, fullpath string) error
- func WriteTruncate[T Type](name string, data T)
- type AppKind
- type Buffer
- func (b *Buffer) AppendByteSlice(bytesSlice ...[]byte) []byte
- func (b *Buffer) BigNumXorWithAlign(arg1, arg2 []byte, align int) (xorStream []byte)
- func (b *Buffer) CheckDesBlockSize()
- func (b *Buffer) Contains(substr string) bool
- func (b *Buffer) CutString(left, right string) (cut string, found bool)
- func (b *Buffer) CutWithIndex(x, y int) []byte
- func (b *Buffer) HexString() HexString
- func (b *Buffer) HexStringUpper() HexString
- func (b *Buffer) Indent(deep int)
- func (b *Buffer) InsertByte(index int, ch byte)
- func (b *Buffer) InsertBytes(index int, insert []byte) []byte
- func (b *Buffer) InsertRune(index int, r rune)
- func (b *Buffer) InsertString(index int, s string) string
- func (b *Buffer) InsertStringWithSplit(size int, insert string) string
- func (b *Buffer) LinesToString(lines []string) string
- func (b *Buffer) MergeByte(streams ...[]byte) []byte
- func (b *Buffer) NewLine() *Buffer
- func (b *Buffer) ObjectBegin()
- func (b *Buffer) ObjectEnd()
- func (b *Buffer) Quote()
- func (b *Buffer) QuoteWith(s string) *Buffer
- func (b *Buffer) ReadBinary(order binary.ByteOrder) (data any)
- func (b *Buffer) ReaderGzip() *Buffer
- func (b *Buffer) ReplaceAll(old, new string) *Buffer
- func (b *Buffer) SliceBegin()
- func (b *Buffer) SliceEnd()
- func (b *Buffer) SplitBytes(size int) (blocks [][]byte)
- func (b *Buffer) SplitString(size int) (blocks []string)
- func (b *Buffer) ToLines() (lines []string)
- func (b *Buffer) WriteBinary(order binary.ByteOrder, data any)
- func (b *Buffer) WriteBytesLn(buf []byte) *Buffer
- func (b *Buffer) WritePackageName()
- func (b *Buffer) WriteStringLn(s string) *Buffer
- type GeneratedFile
- type HexDumpString
- type HexString
- type Interface
- type Session
- type Type
Constants ¶
View Source
const TimeLayout = "2006-01-02 15:04:05"
Variables ¶
View Source
var ( RegexpIp = regexp.MustCompile(`((25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))`) // todo panic RegexpIpPort = regexp.MustCompile(`((25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))):([0-9]+)`) )
View Source
var RegexpCenter = `(.+?)`
Functions ¶
func AlignString ¶
func CheckLoopvarAndNilPoint ¶
func CheckLoopvarAndNilPoint()
func ConvertUtf82Gbk ¶
func CreatDirectory ¶
func CurrentDirName ¶
func CutUint16_ ¶
func FileExists ¶
func FixUncPath ¶
func Float64ToString ¶
func FormatDuration ¶
func FormatTime ¶
func GenerateRandomNumber ¶
func GetDiffDays ¶
func GetPackageName ¶
func GetPackageName() (pkgName string)
func GetTimeNowString ¶
func GetTimeNowString() string
func GetTimeStamp ¶
func GetTimeStamp() string
func GetTimeStamp13Bits ¶
func GetTimeStamp13Bits() int64
func GetUserConfigDirs ¶
func IntegerToIP ¶
func IsDragonfly ¶
func IsDragonfly() bool
func IsFilePath ¶
func JoinHomeDir ¶
func JoinHomeFile ¶
func JsonIndent ¶
func Lines ¶
Lines returns the lines in the file x, including newlines. If the file does not end in a newline, one is supplied along with a warning about the missing newline.
func MarshalJSON ¶
func MarshalJsonToFile ¶
func NewVersion ¶
func ParseFloat ¶
func ReadEmbedFilesToMap ¶ added in v0.0.7
func ReadFileAndWriteTruncate ¶
func ReadFileAndWriteTruncate(path, dstPath string)
func ReadFileToLines ¶
func RegexpWebBodyBlocks ¶
func SetNameAndEmail ¶
func SetNameAndEmail(s *Buffer)
func SetSafecrlf ¶
func SetSafecrlf(s *Buffer)
func SlicesIndex ¶
func SubStrRunes ¶
func SwapBytes2HexString2 ¶
SwapBytes2HexString2 逆序,并不是交换 todo 重命名为 Reverse,如果输入参数复合8字节以下的字节对齐可以用二进制包,不过不通用
func ToCamelToLower ¶
func ToCamelUpper ¶
func TrimExtension ¶
func UnFormatDuration ¶
func UnFormatTime ¶
func UpdateModsByWorkSpace ¶
func WriteAppend ¶
func WriteBinaryFile ¶
func WriteGoFile ¶
func WriteLines ¶
func WriteTruncate ¶
Types ¶
type AppKind ¶
type AppKind byte
const ( SuperRecovery4Kind AppKind = iota AneData6Kind ChaoQiangZhaoPianKind DataExploreKind DiskGetorKind DocxBuildKind ExcelHuiFuZhuanJiaKind ExcelRebuild1Kind ExcelRebuild3Kind ExcelScanKind HykHfKind Jphf3Kind MailScanKind OfficeBuildKind OfficeZipBuildKind PptxBuildKind SuperRecovery2Kind WordRepairerKind WordScanKind XlsxBuildKind ZipBuildKind InvalidAppKind )
func ConvertInteger2AppKind ¶
func ConvertInteger2AppKind[T constraints.Integer](v T) AppKind
func (AppKind) AssertKind ¶
func (AppKind) SvgFileName ¶
type Buffer ¶
func NewHexDump ¶
func NewHexDump(hexdumpStr HexDumpString) (data *Buffer)
func ReaderGzip ¶
func (*Buffer) AppendByteSlice ¶
func (*Buffer) BigNumXorWithAlign ¶
func (*Buffer) CheckDesBlockSize ¶
func (b *Buffer) CheckDesBlockSize()
func (*Buffer) CutWithIndex ¶
func (*Buffer) HexStringUpper ¶
func (*Buffer) InsertByte ¶
func (*Buffer) InsertRune ¶
func (*Buffer) InsertStringWithSplit ¶
func (*Buffer) LinesToString ¶
func (*Buffer) ObjectBegin ¶
func (b *Buffer) ObjectBegin()
func (*Buffer) ReplaceAll ¶
func (*Buffer) SliceBegin ¶
func (b *Buffer) SliceBegin()
func (*Buffer) SplitBytes ¶
func (*Buffer) SplitString ¶
func (*Buffer) WriteBytesLn ¶
func (*Buffer) WritePackageName ¶
func (b *Buffer) WritePackageName()
func (*Buffer) WriteStringLn ¶
type GeneratedFile ¶
type GeneratedFile struct {
// contains filtered or unexported fields
}
func (*GeneratedFile) Enum ¶
func (g *GeneratedFile) Enum(kindName string, kinds, tooltip []string)
func (*GeneratedFile) P ¶
func (g *GeneratedFile) P(v ...any)
func (*GeneratedFile) ReadTemplates ¶
func (g *GeneratedFile) ReadTemplates(path string)
type Interface ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package constraints defines a set of useful constraints to be used with type parameters.
|
Package constraints defines a set of useful constraints to be used with type parameters. |
|
Package datasize provides a data size type and constants.
|
Package datasize provides a data size type and constants. |
|
net
|
|
|
httpClient
<nilaway struct enable>
|
<nilaway struct enable> |
|
transport/tcp/m
command
|
|
|
script
|
|
Click to show internal directories.
Click to hide internal directories.