 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func AlignString(s string, length int) (ss string)
- func BaseName(path string) string
- func Bool2Integer[T Integer](b bool) T
- func Call(f func())
- func ChdirToGithubWorkspace()
- func Check[T any](result T) (isEof bool)
- func Check2[T any](ret T, err error) T
- func Check2Bool[T any](ret T, ok bool) T
- func Check2ForJsonNumberNodeType[T any](ret T, err error) bool
- func Check2Ignore[T any](ret T, err error) T
- func Check2IgnoreBool[T any](ret T, err error) (T, bool)
- func Check3[T1 any, T2 any](ret1 T1, ret2 T2, err error) (T1, T2)
- func Check3Bool[T1 any, T2 any](ret1 T1, ret2 T2, ok bool) (T1, T2)
- func Check4[T1 any, T2 any, T3 any](ret1 T1, ret2 T2, ret3 T3, err error) (T1, T2, T3)
- func Check4Bool[T1 any, T2 any, T3 any](ret1 T1, ret2 T2, ret3 T3, ok bool) (T1, T2, T3)
- func Check5[T1 any, T2 any, T3 any, T4 any](ret1 T1, ret2 T2, ret3 T3, ret4 T4, err error) (T1, T2, T3, T4)
- func Check5Bool[T1 any, T2 any, T3 any, T4 any](ret1 T1, ret2 T2, ret3 T3, ret4 T4, ok bool) (T1, T2, T3, T4)
- func Check6[T1 any, T2 any, T3 any, T4 any, T5 any](ret1 T1, ret2 T2, ret3 T3, ret4 T4, ret5 T5, err error) (T1, T2, T3, T4, T5)
- func Check6Bool[T1 any, T2 any, T3 any, T4 any, T5 any](ret1 T1, ret2 T2, ret3 T3, ret4 T4, ret5 T5, ok bool) (T1, T2, T3, T4, T5)
- func Check7[T1 any, T2 any, T3 any, T4 any, T5 any, T6 any](ret1 T1, ret2 T2, ret3 T3, ret4 T4, ret5 T5, ret6 T6, err error) (T1, T2, T3, T4, T5, T6)
- func Check7Bool[T1 any, T2 any, T3 any, T4 any, T5 any, T6 any](ret1 T1, ret2 T2, ret3 T3, ret4 T4, ret5 T5, ret6 T6, ok bool) (T1, T2, T3, T4, T5, T6)
- func CheckIgnore(err any)
- func CheckNil(ptr any)
- func Copy(src, dst string)
- func CopyDir(dst, src string)
- func CopyFile(path, dstPath string)
- func CopyWithMask(src, dst string, mask fs.FileMode)
- func CreatDirectory(dir string) bool
- func CurrentDirName(path string) (currentDirName string)
- func DirDepth(dirPath string) (depth int)
- func DumpHex[T []byte | *bytes.Buffer](buf T) (dump string)
- func DumpRequest(req *http.Request, body bool) string
- func DumpResponse(resp *http.Response, body bool) string
- func FileExists(path string) bool
- func FileLineCountIsMoreThan(path string, n int) bool
- func FormatInteger[T Integer](data T) string
- func FormatIntegerHex[T Integer](data T) string
- func FormatIntegerHex0x[T Integer](data T) string
- func FormatTime(t time.Time) string
- func GenA2Z() iter.Seq[string]
- func GenMask()
- func GetDaysDiff(dstTime string) string
- func GetPackageName() (pkgName string)
- func GetTimeNowString() string
- func GetTimeStamp() string
- func GetTimeStamp13Bits() int64
- func GetUserConfigDirs() (UserConfigDirs map[string]string)
- func GetWindowsLogicalDrives() iter.Seq[string]
- func GitProxy(isSetProxy bool)
- func Hex[K keyType, V Unsigned](title K, v V) string
- func HexDump[K keyType, V []byte | *bytes.Buffer](title K, buf V)
- func HomeDir() string
- func Info[K keyType](title K, msg ...any)
- func Integer2Bool[T Integer](value T) bool
- func IntegerToIP(ip int64) string
- func IsASCIIDigit(s string) bool
- func IsAndroid() bool
- func IsDarwin() bool
- func IsDir(path string) bool
- func IsDirEx(path string) (ok bool)
- func IsDirRoot(path string) bool
- func IsFilePath(path string) bool
- func IsFilePathEx(path string) (ok bool)
- func IsFreebsd() bool
- func IsIncludeLine(s string) bool
- func IsIos() bool
- func IsJs() bool
- func IsLinux() bool
- func IsTermux() bool
- func IsWindows() bool
- func IsZero(v reflect.Value) bool
- func JoinHomeDir(path string) (join string)
- func JoinHomeFile(path string) (join string)
- func Json[K keyType](title K, msg ...any)
- func JsonIndent(b []byte) string
- func Lines(s string) iter.Seq2[int, string]
- func LinesBytes(s []byte) iter.Seq2[int, []byte]
- func MarshalJSON(v any) []byte
- func MarshalJson[K keyType](title K, msg any)
- func MarshalJsonToFile(v any, name string)
- func New() *log
- func RandomAnySlice[T any](slice []T) T
- func ReadFileToChunks(path string, n int) iter.Seq[[]byte]
- func ReadFileToLines(path string) iter.Seq[string]
- func ReflectVisibleFields(object any) iter.Seq2[int, reflect.StructField]
- func RegexpWebBodyBlocks(tagName string) string
- func Request(Request *http.Request, body bool)
- func Response(Response *http.Response, body bool)
- func RunDir() string
- func SetCallBack(callBack func(row string))
- func SetDebug(debug bool)
- func Struct(object any)
- func Success[K keyType](title K, msg ...any)
- func Todo(body any)
- func Trace[K keyType](title K, msg ...any)
- func TrimExtension(path string) string
- func ValueIsBytesType(v reflect.Value) bool
- func Warning[K keyType](title K, msg ...any)
- 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 WriteTruncate[T Type](name string, data T)
- type Buffer
- func (b *Buffer) Append(others ...*Buffer) *Buffer
- func (b *Buffer) AppendByteSlice(bytesSlice ...[]byte) []byte
- func (b *Buffer) BigNumXorWithAlign(arg1, arg2 []byte, align int) []byte
- func (b *Buffer) Contains(substr string) bool
- func (b *Buffer) CutWithIndex(x, y int) []byte
- func (b *Buffer) Empty() bool
- 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)
- func (b *Buffer) InsertString(index int, s string) *Buffer
- func (b *Buffer) Join(sep string, size int) string
- func (b *Buffer) NewLine() *Buffer
- func (b *Buffer) ObjectBegin()
- func (b *Buffer) ObjectEnd()
- func (b *Buffer) Peek(n int) []byte
- func (b *Buffer) Quote()
- func (b *Buffer) QuoteWith(s string) *Buffer
- func (b *Buffer) ReWriteSelf()
- func (b *Buffer) ReWriteSelfGo()
- func (b *Buffer) ReadBinary(order binary.ByteOrder) (data any)
- func (b *Buffer) ReadN(n int) []byte
- func (b *Buffer) ReaderGzip() *Buffer
- func (b *Buffer) Replace(old, new string, n int) *Buffer
- func (b *Buffer) ReplaceAll(old, new string) *Buffer
- func (b *Buffer) Reverse() *Buffer
- func (b *Buffer) SliceBegin()
- func (b *Buffer) SliceEnd()
- func (b *Buffer) ToLines() (lines iter.Seq[string])
- func (b *Buffer) TrimPrefix(prefix string) *Buffer
- func (b *Buffer) TrimSpace() *Buffer
- func (b *Buffer) TrimSuffix(suffix string) *Buffer
- 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 Complex
- type Float
- type HexDumpString
- type HexString
- type Integer
- type Ordered
- type Signed
- type Type
- type Unsigned
Constants ¶
const ( FgHiBlack attribute = iota + 90 FgHiRed FgHiGreen FgHiYellow FgHiBlue FgHiMagenta FgHiCyan FgHiWhite )
Foreground Hi-Intensity text colors
const TimeLayout = "2006-01-02 15:04:05"
    Variables ¶
var ( GithubWorkspace = os.Getenv("GITHUB_WORKSPACE") IsAction = GithubWorkspace != "" )
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)))`) 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]+)`) )
var RegexpCenter = `(.+?)`
    var RuntimePrefixesToFilter = []string{
	"runtime.",
	"testing.",
	"github.com/ddkwork/golibrary/std/mylog.callWithHandler",
	"github.com/ddkwork/golibrary/std/mylog.Call",
}
    Functions ¶
func AlignString ¶
func Bool2Integer ¶
func ChdirToGithubWorkspace ¶
func ChdirToGithubWorkspace()
func Check2Bool ¶
func Check2Ignore ¶
func Check2IgnoreBool ¶
func Check3Bool ¶
func Check4Bool ¶
func Check5Bool ¶
func Check6Bool ¶
func Check7Bool ¶
func CheckIgnore ¶
func CheckIgnore(err any)
func CopyWithMask ¶
CopyWithMask src to dst. src may be a directory, file, or symlink.
func CreatDirectory ¶
func CurrentDirName ¶
func FileExists ¶
FileExists returns true if the path points to a regular file.
func FileLineCountIsMoreThan ¶
func FormatInteger ¶
func FormatIntegerHex ¶
func FormatIntegerHex0x ¶
func FormatTime ¶
func GetDaysDiff ¶
func GetPackageName ¶
func GetPackageName() (pkgName string)
func GetTimeNowString ¶
func GetTimeNowString() string
func GetTimeStamp ¶
func GetTimeStamp() string
func GetTimeStamp13Bits ¶
func GetTimeStamp13Bits() int64
func GetUserConfigDirs ¶
func GetWindowsLogicalDrives ¶
func Integer2Bool ¶
func IntegerToIP ¶
func IsASCIIDigit ¶
func IsFilePath ¶
func IsFilePathEx ¶
func IsIncludeLine ¶
func JoinHomeDir ¶
func JoinHomeFile ¶
func JsonIndent ¶
func Lines ¶
Lines returns an iterator over the newline-terminated lines in the string s. The lines yielded by the iterator include their terminating newlines. If s is empty, the iterator yields no lines at all. If s does not end in a newline, the final yielded line will not end in a newline. It returns a single-use iterator with both line number and line content.
func LinesBytes ¶
LinesBytes returns an iterator over the newline-terminated lines in the byte slice s. The lines yielded by the iterator include their terminating newlines. If s is empty, the iterator yields no lines at all. If s does not end in a newline, the final yielded line will not end in a newline. It returns a single-use iterator.
func MarshalJSON ¶
func MarshalJson ¶
func MarshalJson[K keyType](title K, msg any)
func MarshalJsonToFile ¶
func RandomAnySlice ¶
func RandomAnySlice[T any](slice []T) T
func ReflectVisibleFields ¶
func RegexpWebBodyBlocks ¶
func SetCallBack ¶
func SetCallBack(callBack func(row string))
func TrimExtension ¶
func ValueIsBytesType ¶
func WriteAppend ¶
func WriteBinaryFile ¶
func WriteGoFile ¶
func WriteTruncate ¶
Types ¶
type Buffer ¶
全排列 矩阵置换 拓扑排序 N叉树 treeGrid
func NewHexDump ¶
func NewHexDump(hexdumpStr HexDumpString) (data *Buffer)
func NewHexString ¶
func ReaderGzip ¶
func SwapAdjacent ¶
func (*Buffer) AppendByteSlice ¶
func (*Buffer) BigNumXorWithAlign ¶
func (*Buffer) CutWithIndex ¶
func (*Buffer) HexStringUpper ¶
func (*Buffer) InsertByte ¶
func (*Buffer) InsertBytes ¶
func (*Buffer) ObjectBegin ¶
func (b *Buffer) ObjectBegin()
func (*Buffer) ReWriteSelf ¶
func (b *Buffer) ReWriteSelf()
func (*Buffer) ReWriteSelfGo ¶
func (b *Buffer) ReWriteSelfGo()
func (*Buffer) ReaderGzip ¶
func (*Buffer) ReplaceAll ¶
func (*Buffer) SliceBegin ¶
func (b *Buffer) SliceBegin()
func (*Buffer) TrimPrefix ¶
func (*Buffer) TrimSuffix ¶
func (*Buffer) WriteBytesLn ¶
func (*Buffer) WritePackageName ¶
func (b *Buffer) WritePackageName()
func (*Buffer) WriteStringLn ¶
type Complex ¶
type Complex interface {
	~complex64 | ~complex128
}
    type HexDumpString ¶
type HexDumpString string