2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 19:08:55 +00:00

Add possibility to set snapshot ID (used in test)

This commit is contained in:
Alexander Weiss 2020-12-28 07:46:56 +01:00 committed by Michael Eischer
parent 04a8ee80fb
commit 696c18e031

View File

@ -146,6 +146,11 @@ func (sn Snapshot) ID() *ID {
return sn.id
}
// SetID sets the snapshot's ID.
func (sn *Snapshot) SetID(id ID) {
sn.id = &id
}
func (sn *Snapshot) fillUserInfo() error {
usr, err := user.Current()
if err != nil {