base

package
v0.0.0-...-804f5dd Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Markdown = iota
	HTML
	URL
	FilePath
)
View Source
const DBTextType = "tt"

Variables

This section is empty.

Functions

func Copy

func Copy(name string, textType int) error

根据配置生成“文件”path

func CopyFile

func CopyFile(filePath string, target string) (string, error)

将filepath中文件拷贝到目标target目录中 返回新添加图片文件名,用于生成图片组件。如不是资源根目录,返回""

func GetFileType

func GetFileType(src []byte) string

用文件前面几个字节来判断 src: 文件字节流(就用前面几个字节)

func ImageFileNames

func ImageFileNames(filePath string) ([]string, error)

返回地址中图片名称数组

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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