if not have file arg, will print usage
This commit is contained in:
		
							parent
							
								
									32d9c634d1
								
							
						
					
					
						commit
						3d41f036da
					
				
							
								
								
									
										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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user