mirror of
https://github.com/octoleo/restic.git
synced 2024-11-05 04:47:51 +00:00
21 lines
336 B
Go
21 lines
336 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
|
||
|
"github.com/fd0/khepri"
|
||
|
)
|
||
|
|
||
|
func commandInit(path string) error {
|
||
|
repo, err := khepri.CreateRepository(path)
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "creating repository at %s failed: %v\n", path, err)
|
||
|
os.Exit(1)
|
||
|
}
|
||
|
|
||
|
fmt.Printf("created khepri repository at %s\n", repo.Path())
|
||
|
|
||
|
return nil
|
||
|
}
|