Merge pull request #77 from blue-bird1/dev
if not have file arg, will print usage
This commit is contained in:
commit
9ca7109abe
5
main.go
5
main.go
@ -44,6 +44,11 @@ func main() {
|
|||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
if len(flag.Args()) == 0{
|
||||||
|
flag.Usage()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
switch profiler {
|
switch profiler {
|
||||||
case "cpu":
|
case "cpu":
|
||||||
defer profile.Start(profile.ProfilePath("."), profile.NoShutdownHook).Stop()
|
defer profile.Start(profile.ProfilePath("."), profile.NoShutdownHook).Stop()
|
||||||
|
Loading…
Reference in New Issue
Block a user