WithSignatureUsing creates a new signed commit from this one using the given signing callback
(f CommitSigningCallback)
| 83 | |
| 84 | // WithSignatureUsing creates a new signed commit from this one using the given signing callback |
| 85 | func (c *Commit) WithSignatureUsing(f CommitSigningCallback) (*Oid, error) { |
| 86 | signature, signatureField, err := f(c.ContentToSign()) |
| 87 | if err != nil { |
| 88 | return nil, err |
| 89 | } |
| 90 | |
| 91 | return c.WithSignature(signature, signatureField) |
| 92 | } |
| 93 | |
| 94 | // WithSignature creates a new signed commit from the given signature and signature field |
| 95 | func (c *Commit) WithSignature(signature string, signatureField string) (*Oid, error) { |