summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--git-shell-commands.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/git-shell-commands.go b/git-shell-commands.go
index 2040e23..1b530f0 100644
--- a/git-shell-commands.go
+++ b/git-shell-commands.go
@@ -15,7 +15,7 @@ const codeDir = "/nezuko/code/"
func checkRepoName(name string) (string, error) {
if strings.Contains(name, "/") {
- return "", fmt.Errorf("invalid name %q: contains slashes")
+ return "", fmt.Errorf("invalid name %q: contains slashes", name)
}
if !strings.HasSuffix(name, ".git") {
name += ".git"
@@ -32,10 +32,10 @@ Create a new git repo named REPO.
flag.Parse()
args := flag.Args()
if len(args) == 0 {
- return fmt.Errorf("missing positional argument")
+ return fmt.Errorf("missing positional argument\nUse create -help for usage info")
}
if len(args) > 1 {
- return fmt.Errorf("too many positional arguments")
+ return fmt.Errorf("too many positional arguments\nUse create -help for usage info")
}
name, err := checkRepoName(args[0])
if err != nil {
@@ -77,10 +77,10 @@ Delete the git repo named REPO.
flag.Parse()
args := flag.Args()
if len(args) == 0 {
- return fmt.Errorf("missing positional argument")
+ return fmt.Errorf("missing positional argument\nUse delete -help for usage info")
}
if len(args) > 1 {
- return fmt.Errorf("too many positional arguments")
+ return fmt.Errorf("too many positional arguments\nUse delete -help for usage info")
}
name, err := checkRepoName(args[0])
if err != nil {
@@ -117,7 +117,7 @@ func main() {
help()
}
if err != nil {
- fmt.Fprintf(os.Stderr, "%s\nUse %s -help for usage info\n", err, cmd)
+ fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}