aboutsummaryrefslogtreecommitdiff
path: root/pkg/rtree/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/rtree/main.go')
-rw-r--r--pkg/rtree/main.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/pkg/rtree/main.go b/pkg/rtree/main.go
index 4c8fb98..683daeb 100644
--- a/pkg/rtree/main.go
+++ b/pkg/rtree/main.go
@@ -38,7 +38,10 @@ func Exec(args []string) {
}
commandGet(args[1])
case "drop":
- panic("unimplemented")
+ if len(args) != 2 {
+ usageAndExit()
+ }
+ commandDrop(args[1])
case "index":
if len(args) != 1 {
usageAndExit()
@@ -88,6 +91,15 @@ func commandGet(url string) {
}
}
+func commandDrop(url string) {
+ index := ReadIndex()
+ repo := index.InteractiveFindRepo(url, false)
+ if repo != nil {
+ index.InteractiveDropRepo(repo)
+ index.Write()
+ }
+}
+
func commandIndex() {
index := ReadIndex()
util.FatalIfError(index.InteractiveRebuild())