blob: 7f9144b788b6ae6295534b227aca290df39b2ceb (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package signedcommit
import objectid "codeberg.org/lindenii/furgit/object/id"
// AppendSignature appends the unfolded signature for algo to dst.
func (commit *Commit) AppendSignature(dst []byte, algo objectid.Algorithm) ([]byte, bool) {
signature, ok := commit.signatures[algo]
if !ok {
return dst, false
}
for _, part := range signature {
dst = append(dst, commit.body[part.start:part.end]...)
}
return dst, true
}
|