增加 未知参数提醒

This commit is contained in:
dengsgo 2019-12-27 16:31:00 +08:00
parent eeaad58d1e
commit 44bb0dd65f

View File

@ -2,8 +2,6 @@ package main
import (
"fmt"
"gopkg.in/fsnotify/fsnotify.v1"
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
"math/rand"
@ -12,6 +10,9 @@ import (
"strconv"
"strings"
"time"
"gopkg.in/fsnotify/fsnotify.v1"
"gopkg.in/yaml.v2"
)
const (
@ -286,8 +287,10 @@ func parseArgs() {
return
case "version", "v", "-v", "--version":
fmt.Println(versionDesc)
default:
case "help", "--help", "--h", "-h":
fmt.Print(helpStr)
default:
fmt.Println(PreError, "Unknown parameter, use 'fileboy help' to view available commands")
}
return
default: