mrlib

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: Apache-2.0 Imports: 15 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallEachFunc added in v0.13.0

func CallEachFunc(ctx context.Context, list []func(ctx context.Context))

CallEachFunc - comment func.

func CheckImage added in v0.12.0

func CheckImage(file io.ReadSeeker, expectedContentType string) error

CheckImage - comment func.

func Close added in v0.13.0

func Close(ctx context.Context, object io.Closer)

Close - comment func.

func CloseFunc added in v0.13.0

func CloseFunc(object io.Closer) func(ctx context.Context)

CloseFunc - comment func.

func DecodeImage added in v0.12.0

func DecodeImage(file io.ReadSeeker, expectedContentType string) (image.Image, error)

DecodeImage - comment func.

func DecodeImageConfig added in v0.12.0

func DecodeImageConfig(file io.ReadSeeker, expectedContentType string) (image.Config, error)

DecodeImageConfig - comment func.

func IP2int added in v0.18.0

func IP2int(ip net.IP) (uint32, error)

IP2int - comment func.

func Int2ip

func Int2ip(number uint32) net.IP

Int2ip - comment func.

func MustIP2int added in v0.18.3

func MustIP2int(ip net.IP) uint32

MustIP2int - comment func.

func RoundFloat added in v0.20.0

func RoundFloat(x float64, precision int) float64

RoundFloat - возвращает округлённую версию числа x с указанной точностью. Особые случаи: - Round(±0) = ±0; - Round(±Inf) = ±Inf; - Round(NaN) = NaN.

func RoundFloat2 added in v0.20.0

func RoundFloat2(x float64) float64

RoundFloat2 - возвращает RoundFloat с точностью 2.

func RoundFloat4 added in v0.20.0

func RoundFloat4(x float64) float64

RoundFloat4 - возвращает RoundFloat с точностью 4.

func RoundFloat8 added in v0.20.0

func RoundFloat8(x float64) float64

RoundFloat8 - возвращает RoundFloat с точностью 8.

func Write added in v0.18.0

func Write(ctx context.Context, w io.Writer, bytes []byte)

Write - comment func.

Types

type MimeType added in v0.9.6

type MimeType struct {
	Extension   string `yaml:"ext"`
	ContentType string `yaml:"type"`
}

MimeType - comment struct.

type MimeTypeList added in v0.18.0

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

MimeTypeList - comment struct.

func NewMimeTypeList added in v0.18.0

func NewMimeTypeList(items []MimeType) *MimeTypeList

NewMimeTypeList - создаёт объект MimeTypeList.

func (*MimeTypeList) CheckContentType added in v0.18.0

func (mt *MimeTypeList) CheckContentType(contentType string) error

CheckContentType - comment method.

func (*MimeTypeList) CheckExt added in v0.18.0

func (mt *MimeTypeList) CheckExt(ext string) error

CheckExt - comment method.

func (*MimeTypeList) CheckExtByFileName added in v0.18.0

func (mt *MimeTypeList) CheckExtByFileName(name string) error

CheckExtByFileName - comment method.

func (*MimeTypeList) ContentType added in v0.18.0

func (mt *MimeTypeList) ContentType(ext string) string

ContentType - comment method.

func (*MimeTypeList) ContentTypeByFileName added in v0.18.0

func (mt *MimeTypeList) ContentTypeByFileName(name string) string

ContentTypeByFileName - comment method.

func (*MimeTypeList) Ext added in v0.18.0

func (mt *MimeTypeList) Ext(contentType string) string

Ext - comment method.

func (*MimeTypeList) NewListByExts added in v0.18.0

func (mt *MimeTypeList) NewListByExts(exts ...string) (*MimeTypeList, error)

NewListByExts - comment method.

Jump to

Keyboard shortcuts

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