Documentation
¶
Index ¶
- func ExtractFirstImage(file string) (image.Image, error)
- func FindFirstFileInDirs(dirs []string, targetFile string) (string, error)
- func IsImageExtension(ext string) bool
- type ZipFileCache
- func (p *ZipFileCache) FindFile(fileName string) (*zip.File, error)
- func (p *ZipFileCache) GetOrCreateFileMap() map[string]*zip.File
- func (p *ZipFileCache) ParseContent(fileName string) ([]byte, error)
- func (p *ZipFileCache) ParseImage(fileName string) (image.Image, error)
- func (p *ZipFileCache) ParseXMLContent(fileName string, target interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFirstFileInDirs ¶
func IsImageExtension ¶ added in v0.0.2
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文件内容
Click to show internal directories.
Click to hide internal directories.