For example, I want to check whether an element in the array, get all the map key, or the map value into slice,
With two slice, intersection or union, the Slice sort, map sort, I found that the operation has no official function support, there is no official package, so it is very difficult to use, not a standard, efficient way.
Perhaps Golang should like PHP/Python built-in some common operations, Programming language is used to solve practical problems。
Reference resources.
Http://us1.php.net/manual/en/ref.array.php
I think in Golang, Array, Slice, and Map , all of them are very difficult to use。For example, I want to check whether an element in the array, get all the map key, or the map value into slice,
With two slice, intersection or union, the Slice sort, map sort, I found that the operation has no official function support, there is no official package, so it is very difficult to use, not a standard, efficient way.
arsort — Sort an array in reverse order and maintain index association
asort — Sort an array and maintain index association
krsort — Sort an array by key in reverse order
ksort — Sort an array by key
natcasesort — Sort an array using a case insensitive "natural order" algorithm
natsort — Sort an array using a "natural order" algorithm
rsort — Sort an array in reverse order
sort — Sort an array
uasort — Sort an array with a user-defined comparison function and maintain index association
uksort — Sort an array by keys using a user-defined comparison function
usort — Sort an array by values using a user-defined comparison function
I think in Golang, Array, Slice, and Map , all of them are very difficult to use。
For example, I want to check whether an element in the array, get all the map key, or the map value into slice,
With two slice, intersection or union, the Slice sort, map sort, I found that the operation has no official function support, there is no official package, so it is very difficult to use, not a standard, efficient way.
Perhaps Golang should like PHP/Python built-in some common operations, Programming language is used to solve practical problems。
[snip]
] array_intersect is a common example of automation. It makes no sense to right it again and again as it is common operation which works the same way.