Created
November 10, 2016 23:06
-
-
Save sbenthall/d56f95433dea614c40e593f685b1bcc8 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 ( | |
"fmt" | |
"gopkg.in/src-d/go-git.v4" | |
) | |
func main() { | |
r, _ := git.NewFilesystemRepository(".git") | |
_ = r.Clone(&git.CloneOptions{URL: "https://github.com/git-fixtures/tags"}) | |
tags, _ := r.Tags() | |
tags.ForEach(func(t *git.Tag) error { | |
fmt.Println(t.ID(), t.Name) | |
return nil | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment