Documentation ¶
Index ¶
- func CallEachFunc(ctx context.Context, list []func(ctx context.Context))
- func CheckImage(file io.ReadSeeker, expectedContentType string) error
- func Close(ctx context.Context, object io.Closer)
- func CloseFunc(object io.Closer) func(ctx context.Context)
- func DecodeImage(file io.ReadSeeker, expectedContentType string) (image.Image, error)
- func DecodeImageConfig(file io.ReadSeeker, expectedContentType string) (image.Config, error)
- func Int2ip(number uint32) net.IP
- func Ip2int(ip net.IP) (uint32, error)
- func Ip2intMust(ip net.IP) uint32
- func MimeType(value, fileName string) string
- func MimeTypeByExt(ext string) string
- func MimeTypeByFile(name string) string
- type BuilderPath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallEachFunc ¶ added in v0.13.0
func CheckImage ¶ added in v0.12.0
func CheckImage(file io.ReadSeeker, expectedContentType string) error
func DecodeImage ¶ added in v0.12.0
func DecodeImageConfig ¶ added in v0.12.0
func Ip2intMust ¶
func MimeType ¶ added in v0.9.6
MimeType - возвращает value если оно не пустое иначе вычисляется тип по расширению файла
func MimeTypeByExt ¶ added in v0.5.4
func MimeTypeByFile ¶ added in v0.9.6
Types ¶
type BuilderPath ¶ added in v0.7.0
func NewBuilderPath ¶ added in v0.7.0
func NewBuilderPath(basePath string) BuilderPath
NewBuilderPath - sample /dir/{{path}}/postfix -> /dir/real-value/postfix
func NewBuilderPathWithPlaceholder ¶ added in v0.8.0
func NewBuilderPathWithPlaceholder(basePath, placeholder string) BuilderPath
Click to show internal directories.
Click to hide internal directories.