libgit2/git2go — pull request #15 by Merovius (2013-04-26 00:10:25+00:00)
Title: Add String() Method to ObjectType

This enables the builtin formatting functions of go to output the type of an object in a human-readable format, for example:

blob, ok := obj.(*git.Blob)
if !ok {
fmt.Errorf("Not a Blob, but a %v", obj.Type())
}