-
-
Save wnitya2/f0e7ba5c648b7b5b4019da016f5cc425 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/novalagung/gubrak" | |
"fmt" | |
) | |
func main() { | |
type HashMap map[string]string | |
data := []HashMap{ | |
{ "name": "tim", "hobby": "stay awake all the time" }, | |
} | |
result, err := gubrak.OrderBy(data, func(each HashMap) string { | |
return each["name"] | |
}) | |
fmt.Printf("result : %+v \n", result) | |
fmt.Printf("%+v \n", err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment