Clean start
This commit is contained in:
		
							
								
								
									
										23
									
								
								main.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								main.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
package main
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"os"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var version = "v0.1.0"
 | 
			
		||||
 | 
			
		||||
func main() {
 | 
			
		||||
	if len(os.Args) < 2 {
 | 
			
		||||
		fmt.Println("provide a command")
 | 
			
		||||
		os.Exit(1)
 | 
			
		||||
	} else if os.Args[1] == "upgrade" {
 | 
			
		||||
		fmt.Print("Trying Upgrade... ")
 | 
			
		||||
		fmt.Println("Error not implemented")
 | 
			
		||||
	} else if os.Args[1] == "version" {
 | 
			
		||||
		fmt.Print("Version ")
 | 
			
		||||
		fmt.Println(version)
 | 
			
		||||
	} else {
 | 
			
		||||
		fmt.Println("provide a valid command (version or upgrade)")
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user