func createFakeLock(repo *repository.Repository, t time.Time, pid int) (backend.ID, error) { hostname, err := os.Hostname() if err != nil { return backend.ID{}, err } newLock := &restic.Lock{Time: t, PID: pid, Hostname: hostname} return repo.SaveJSONUnpacked(backend.Lock, &newLock) }
func createFakeLock(repo *repository.Repository, t time.Time, pid int) (backend.ID, error) { newLock := &restic.Lock{Time: t, PID: pid} return repo.SaveJSONUnpacked(backend.Lock, &newLock) }