Categorygithub.com/praesyx/go-commons
modulepackage
0.0.0-20240723162423-377d308217e3
Repository: https://github.com/praesyx/go-commons.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
Base64Unmarshal сериализация JSON объекта в структуру Пример: type A struct { B string `json:"b"` } var a A if err := Base64Unmarshal("{"b":"hello"}", &a); nil != err { fmt.Println(err) }.
No description provided by the author
No description provided by the author
DecodePolyline converts a polyline encoded string to an array of LatLng objects.
Filter вернет новый объект Collection с отфильтрованными условиями которые переданы в функции фильтр Пример: type A struct { Name string} func main() { var a []A for i := 0; i < 5; i++ { a = append(a, A{Name: fmt.Sprintf("Hello%d", i)}) } c, _ := Filter(a, func(a any) bool { if a.(A).Name != "Hello2" { return false } return true }) fmt.Println(c.Last())}.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InArray проверка, присутствует значение в срезе или массиве.
InArrayByField проверка, присутствует значение в интерфейсе по полю Пример: type A struct { R struct { Val []string } } a := A{R: struct{Val []string}{Val: []string{"ROLE"}}} if ok, i := utils.InArrayByField("ROLE", &a.R, "val"); ok { fmt.Println("OK", i) }.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MapToStructureUnmarshal сериализация карты в структуру для примера смотрите документацию https://pkg.go.dev/github.com/mitchellh/mapstructure.
MHash генерация уникального hash.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author