utils

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2026 License: Unlicense Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFirstImage added in v0.0.2

func ExtractFirstImage(file string) (image.Image, error)

func FindFirstFileInDirs

func FindFirstFileInDirs(dirs []string, targetFile string) (string, error)

func IsImageExtension added in v0.0.2

func IsImageExtension(ext string) bool

Types

type ZipFileCache

type ZipFileCache struct {
	// contains filtered or unexported fields
}

func NewZipFileCache

func NewZipFileCache(reader *zip.Reader) *ZipFileCache

NewZipFileCache 创建ZIP文件缓存

func (*ZipFileCache) FindFile

func (p *ZipFileCache) FindFile(fileName string) (*zip.File, error)

FindFile 查找文件(使用缓存映射)

func (*ZipFileCache) GetOrCreateFileMap

func (p *ZipFileCache) GetOrCreateFileMap() map[string]*zip.File

GetOrCreateFileMap 获取或创建文件映射

func (*ZipFileCache) ParseContent

func (p *ZipFileCache) ParseContent(fileName string) ([]byte, error)

func (*ZipFileCache) ParseImage

func (p *ZipFileCache) ParseImage(fileName string) (image.Image, error)

func (*ZipFileCache) ParseXMLContent

func (p *ZipFileCache) ParseXMLContent(fileName string, target interface{}) error

ParseXMLContent 解析XML文件内容

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL