diff options
Diffstat (limited to 'pkg/rtree/main.go')
| -rw-r--r-- | pkg/rtree/main.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkg/rtree/main.go b/pkg/rtree/main.go index 9513d06..2a85ab9 100644 --- a/pkg/rtree/main.go +++ b/pkg/rtree/main.go @@ -33,7 +33,10 @@ func Exec(args []string) { } switch args[0] { case "get": - panic("unimplemented") + if len(args) != 2 { + usageAndExit() + } + commandGet(args[1]) case "drop": panic("unimplemented") case "index": @@ -74,6 +77,14 @@ func usageAndExit() { os.Exit(1) } +func commandGet(url string) { + index := ReadIndex() + repo := index.InteractiveFindRepo(url, true) + if repo != nil { + fmt.Println(repo.AbsolutePath()) + } +} + func commandIndex() { index := ReadIndex() util.FatalIfError(index.InteractiveRebuild()) |
