diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2017-05-05 19:56:30 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2017-05-05 19:56:30 +0200 |
| commit | e1022c29c33363bd3c2471b7cef2d37dbd704dca (patch) | |
| tree | 0dcdb756d10d0e53c4c5589fa12e5f547123b589 /pkg/rtree/main.go | |
| parent | cdf41693a87559dee892c042591a409200637b9a (diff) | |
| download | gofu-e1022c29c33363bd3c2471b7cef2d37dbd704dca.tar.gz | |
implement rtree import
Diffstat (limited to 'pkg/rtree/main.go')
| -rw-r--r-- | pkg/rtree/main.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/rtree/main.go b/pkg/rtree/main.go index 2a85ab9..4c8fb98 100644 --- a/pkg/rtree/main.go +++ b/pkg/rtree/main.go @@ -55,7 +55,10 @@ func Exec(args []string) { } commandRemotes() case "import": - panic("unimplemented") + if len(args) != 2 { + usageAndExit() + } + commandImport(args[1]) case "each": if len(args) < 2 { usageAndExit() @@ -124,3 +127,9 @@ func commandEach(command string, args []string) { os.Exit(1) } } + +func commandImport(dirPath string) { + index := ReadIndex() + index.InteractiveImportRepo(dirPath) + index.Write() +} |
