Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - func B2S(b []byte) string
 - func Bool2Int(v bool) int
 - func CloseIO(reader io.Reader)
 - func LazyTernary[T any](condition bool, trueFunc, falseFunc func() T) T
 - func Map[T any, U any](list []T, mapper func(T) U) []U
 - func MustParseHexStr(s string) []byte
 - func NewTrace() string
 - func NewUUID() string
 - func ReadLine() string
 - func S2B(s string) (b []byte)
 - func Ternary[T any](condition bool, trueValue, falseValue T) T
 - func TimeStamp() int64
 - func UinTimestamp(uin uint32) string
 - type ImageFormat
 - type StringInterner
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var (
	ErrImageDataTooShort = errors.New("image data is too short")
)
    Functions ¶
func LazyTernary ¶
func MustParseHexStr ¶
func S2B ¶
S2B converts string to a byte slice without memory allocation.
Note it may break if string and/or slice header will change in the future go versions.
func UinTimestamp ¶
Types ¶
type ImageFormat ¶
type ImageFormat uint32
const ( Unknown ImageFormat = 0000 Jpeg ImageFormat = 1000 Png ImageFormat = 1001 Gif ImageFormat = 2000 Webp ImageFormat = 1002 Bmp ImageFormat = 1005 Tiff ImageFormat = 1006 )
func ImageResolve ¶
func ImageResolve(image io.ReadSeeker) (format ImageFormat, size imgsz.Size, err error)
func (ImageFormat) String ¶
func (format ImageFormat) String() string
type StringInterner ¶
type StringInterner struct {
	// contains filtered or unexported fields
}
    func NewStringInterner ¶
func NewStringInterner() *StringInterner
func (*StringInterner) Intern ¶
func (i *StringInterner) Intern(s string) string
 Click to show internal directories. 
   Click to hide internal directories.