6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-06 15:42:56 +00:00

Update help commands and errors messages

This commit is contained in:
Grzegorz Dlugoszewski
2020-06-19 16:39:26 +02:00
parent de51c05158
commit 4868713746
11 changed files with 100 additions and 73 deletions

View File

@@ -1,6 +1,7 @@
package pkg
import (
"fmt"
"git-get/pkg/repo"
"path"
)
@@ -16,7 +17,9 @@ type GetCfg struct {
// Get executes the "git get" command.
func Get(c *GetCfg) error {
// TODO: show something when no args
if c.URL == "" && c.Dump == "" {
return fmt.Errorf("missing <REPO> argument or --dump flag")
}
if c.URL != "" {
return cloneSingleRepo(c)