I am trying to get the latest github tag from my local repository in golang. For now I am getting all the tags, code is below:
repo, err := git.OpenRepository("/home/defiant/Temp/repo")
checkErr(err)
re, err := repo.Tags.List()
checkErr(err)
fmt.Println(re)
The result returned is of the format:
[0.1 1.3 1.4]
Here 1.3 is the latest tag. So can someone please help me out in getting only the latest tag?