Skip to content

Instantly share code, notes, and snippets.

@wnitya2
Last active August 13, 2018 04:58
Show Gist options
  • Save wnitya2/f0e7ba5c648b7b5b4019da016f5cc425 to your computer and use it in GitHub Desktop.
Save wnitya2/f0e7ba5c648b7b5b4019da016f5cc425 to your computer and use it in GitHub Desktop.
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