add documentation to Trailer & MessageTrailers

This commit is contained in:
Jesse Hathaway 2020-06-02 14:42:55 +00:00
parent 482da8fcb0
commit 0e26174be2
1 changed files with 4 additions and 0 deletions

View File

@ -9,11 +9,15 @@ import (
"unsafe"
)
// Trailer represents a single git message trailer.
type Trailer struct {
key string
value string
}
// MessageTrailers parses trailers out of a message, returning a slice of
// Trailer structs. Trailers are key/value pairs in the last paragraph of a
// message, not including any patches or conflicts that may be present.
func MessageTrailers(message string) ([]Trailer, error) {
var trailersC C.git_message_trailer_array