Documentation
¶
Index ¶
- func CheckFreePort(ip string, port int) (int, error)
- func Contains(a []string, x string) bool
- func FilteringMode(src string, key int) string
- func GenUpdates(a, b []string) []*naming.Update
- func GetFreePort(ip string, start int, end int) (port int, err error)
- func GetFullNumber(card string, limit int) (res string)
- func GetPort(ip string) (port int, err error)
- func GetTodayShow() string
- func GetTotal(cnt int64, max int64) int64
- func IsExits(name string, args []string) bool
- func RandNumberSeq(n int) string
- func RandSeq(n int) string
- func ReplaceNameToKey(src string, stopWord string) (result string)
- func ResolveHostIp() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilteringMode ¶
FilteringMode - return sql operator
func GenUpdates ¶
func GetFreePort ¶
GetFreePort - поиск свободного порта из диапазона
port, err := core.GetFreePort("localhost", 9000, 9999)
if err != nil {
fmt.Println(err.Error())
}
fmt.Println("free port: ", port)
func GetFullNumber ¶
GetFullNumber - Возвращает номер заполняя в начале нулями определенной длины card - изнвчальное число limit - длина символов в результате format 1234567 -> 0001234567
func GetTodayShow ¶
func GetTodayShow() string
GetTodayShow - возвращает текущую дату как строка 20180624
func IsExits ¶
IsExits - проверяем есть ли такой аргумент
args := []string{"sub", "arg1", "arg2"}
fmt.Println("is exits:", IsExits("arg2", args))
func ReplaceNameToKey ¶
ReplaceNameToKey - преобразуем строку в ключ для CouchDB src := "Привет|name? \\ / {} ! `@#$%^&()-+=~ '<[ витя \"рога Копїта \"]>' = 1.2кг 1,03" stopWord := " кг | для | литр | і | и | нет" @response - привет_name_витя_рога_копїта
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.