helpers

package
v1.1.34 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: GPL-3.0 Imports: 12 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesCrlfs

func BytesCrlfs(b []byte) []byte

func DecodeRFC2047 added in v1.1.23

func DecodeRFC2047(s string) string

func FileExists

func FileExists(path string) bool

func FromImap4Utf7

func FromImap4Utf7(str string) string

func IMAPReadSize

func IMAPReadSize(n int, c net.Conn, reader *bufio.Reader) ([]byte, error)

func IMAPReadline

func IMAPReadline(c net.Conn, reader *bufio.Reader) ([]byte, bool, error)

IMAPReadline - читает строку байт до новой строки

func MessageIDfromTime

func MessageIDfromTime(t time.Time) string

func ReGroupsToMap

func ReGroupsToMap(r *regexp.Regexp, str string) map[string]string

ReGroupsToMap - возвращает сопоставление групп найденным подстрокам

func ReGroupsToMapMultiple

func ReGroupsToMapMultiple(r *regexp.Regexp, str string) []map[string]string

func SMTPReadline

func SMTPReadline(c net.Conn, reader *bufio.Reader) ([]byte, bool, error)

SMTPReadline - читает строку байт до новой строки

func SendMsg

func SendMsg(writer *bufio.Writer, msg string)

SendMsg - отправляет строку клиенту

func StringCrlf

func StringCrlf(s string) string

func StringExcludeSlice

func StringExcludeSlice(slice, exSlice []string) []string

StringExcludeSlice - возвращает срез строк slice без элементов среза exSlice

func StringSliceContains

func StringSliceContains(slice []string, str string) bool

func StringSliceExtend

func StringSliceExtend(slice []string, otherSlice []string) []string

func StringSliceFilter

func StringSliceFilter(filterFunc func(string) bool, slice []string) []string

func StringSliceFuncMap

func StringSliceFuncMap(filterFunc func(string) string, slice []string) []string

func StringSliceToLower

func StringSliceToLower(s []string) []string

func StringSliceToUpper

func StringSliceToUpper(s []string) []string

func StringSliceWoEmpty

func StringSliceWoEmpty(slice []string) []string

func StringSliceWoSpaces

func StringSliceWoSpaces(slice []string) []string

func StringStringMapKeys

func StringStringMapKeys(m map[string]string) []string

func ToImap4Utf7

func ToImap4Utf7(str string) string

Types

type StringSet

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

--------------------------------------------------------------- StringSet - реализация set() для строк

func NewStringSet

func NewStringSet() *StringSet

func (*StringSet) Add

func (obj *StringSet) Add(v string)

func (*StringSet) Del

func (obj *StringSet) Del(key string)

func (*StringSet) Exclude

func (obj *StringSet) Exclude(v []string)

func (*StringSet) Extend

func (obj *StringSet) Extend(v []string)

func (*StringSet) Get

func (obj *StringSet) Get() []string

func (*StringSet) Len

func (obj *StringSet) Len() int

type Uint64Set

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

------------------------------------------------------------

func NewUint64Set

func NewUint64Set() *Uint64Set

func (*Uint64Set) Add

func (obj *Uint64Set) Add(v uint64)

func (*Uint64Set) Del

func (obj *Uint64Set) Del(key uint64)

func (*Uint64Set) Exclude

func (obj *Uint64Set) Exclude(v []uint64)

func (*Uint64Set) Extend

func (obj *Uint64Set) Extend(v []uint64)

func (*Uint64Set) Get

func (obj *Uint64Set) Get() []uint64

func (*Uint64Set) Len

func (obj *Uint64Set) Len() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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