Skip to content

miolini/easysort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easysort

Build Status GoDoc

Easy sort in Go

Example

import (
	"fmt"
	"github.com/miolini/easysort"
)

type User struct {
	Name string
	Age  int
}

func main() {
	users := []User{ User{"testa", 45}, User{"testb", 30} }
	easysort.ByField(users, "Age")
	fmt.Println(users)
	easysort.Reverse(users)
	fmt.Println(users)
}

About

Easy sort in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages