blob: 7c5954ab60222bc40e5865b9d4792d35a285ac2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
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() {
if argv.Refs {
showRefs()
} else {
testMessage()
}
}
func showRefs() {
log.Info("how do you do this with libgit2 and git2go? notsure.")
}
func testMessage() {
var input git.Trailer
input.Key = "Co-authored-by"
input.Value = "Alice <[email protected]>"
/*
git2go.Trailer
git2go.Trailer{Key: "Signed-off-by", Value: "Bob <[email protected]>"}}
*/
fmt.Printf("%s", input)
actual, err := git.MessageTrailers(input.Key)
log.Info("actual", actual, err)
}
|