autogenpb/testSort/main.go

28 lines
492 B
Go

package main
import "log"
import "go.wit.com/apps/autogenpb/testautogen"
func main() {
all := new(testautogen.GitTags)
// newt := new(testautogen.GitTag)
new1 := testautogen.GitTag{
Refname: "master",
Objectname: "blah",
}
all.Append(&new1)
new2 := testautogen.GitTag{
Refname: "devel",
Objectname: "j23jljalse",
}
all.Append(&new2)
loop := all.SortByPath()
for loop.Scan() {
t := loop.Next()
log.Println("hello testSort t.Refname =", t.Refname, t.Objectname)
}
}