Add locking functions

This commit is contained in:
Alexander Neumann
2015-06-24 18:17:01 +02:00
parent 26e4d2e019
commit d51fd436b5
4 changed files with 424 additions and 1 deletions

View File

@@ -126,7 +126,19 @@ func (cmd CmdCat) Execute(args []string) error {
fmt.Println(string(buf))
return nil
case "lock":
return errors.New("not yet implemented")
lock, err := restic.LoadLock(s, id)
if err != nil {
return err
}
buf, err := json.MarshalIndent(&lock, "", " ")
if err != nil {
return err
}
fmt.Println(string(buf))
return nil
}
// load index, handle all the other types