28 lines
477 B
Go
28 lines
477 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
git "go.wit.com/lib/libgit2"
|
||
|
"go.wit.com/log"
|
||
|
)
|
||
|
|
||
|
// are sent via -ldflags at buildtime
|
||
|
var VERSION string
|
||
|
var BUILDTIME string
|
||
|
|
||
|
func main() {
|
||
|
var input git.Trailer
|
||
|
|
||
|
input.Key = "Co-authored-by"
|
||
|
input.Value = "Alice <alice@example.com>"
|
||
|
/*
|
||
|
git2go.Trailer
|
||
|
git2go.Trailer{Key: "Signed-off-by", Value: "Bob <bob@example.com>"}}
|
||
|
*/
|
||
|
|
||
|
fmt.Printf("%s", input)
|
||
|
actual, err := git.MessageTrailers(input.Key)
|
||
|
log.Info("actual", actual, err)
|
||
|
}
|