Documentation
¶
Index ¶
- Variables
- func ConvertToInt[T int | int64](s string) T
- func DecodeFromUTF16(a []uint16) string
- func DeepCopy[T any](from *T) (*T, error)
- func Distinct(a []string) []string
- func EncodeToUTF16(s string) []uint16
- func EscapeMarkdown(text string) string
- func GetConfigOptions() viper.DecoderConfigOption
- func GetCurrDir() string
- func GetCurrentDate() string
- func GetFlag(name string) *string
- func GetReleaseVersion() string
- func HasFlag(name string) bool
- func Int64ToString(i int64) string
- func IsPortFree(addr string) bool
- func MakeDir(dir string)
- func MaskPhoneNumber(phone string) string
- func NewFuncWithIndex(prefix string) func() string
- func RemoveDir(dir string)
- func SimpleCopy[T any](from *T) *T
- func StringToInt64(s string) int64
Constants ¶
This section is empty.
Variables ¶
View Source
var ProjectRoot string
Functions ¶
func ConvertToInt ¶
ConvertToInt преобразует строку в целое число
func DecodeFromUTF16 ¶ added in v0.0.2
DecodeFromUTF16 преобразует срез UTF-16 в строку
func EncodeToUTF16 ¶ added in v0.0.2
EncodeToUTF16 преобразует строку в срез UTF-16
func EscapeMarkdown ¶ added in v0.0.2
EscapeMarkdown экранирует markdown спецсимволы
func GetConfigOptions ¶
func GetConfigOptions() viper.DecoderConfigOption
GetConfigOptions Настраиваем декодирование
func GetCurrDir ¶
func GetCurrDir() string
func GetCurrentDate ¶
func GetCurrentDate() string
GetCurrentDate возвращает текущую дату в формате YYYY-MM-DD
func GetReleaseVersion ¶ added in v0.0.2
func GetReleaseVersion() string
func Int64ToString ¶ added in v0.0.2
Int64ToString преобразует int64 в строку
func IsPortFree ¶ added in v0.0.2
IsPortFree проверяет, свободен ли порт
func MaskPhoneNumber ¶
maskPhoneNumber маскирует номер телефона, заменяя 5 цифр перед последними двумя Например, +7 926 111 22 33 становится +7926*****33
func NewFuncWithIndex ¶
func SimpleCopy ¶
func SimpleCopy[T any](from *T) *T
func StringToInt64 ¶ added in v0.0.2
StringToInt64 преобразует строку в int64
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.