Added stub arfc command
This commit is contained in:
		
							parent
							
								
									e8f6165f38
								
							
						
					
					
						commit
						e7bd6ee02c
					
				
							
								
								
									
										21
									
								
								arfc/main.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								arfc/main.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,21 @@ | ||||
| package arfc | ||||
| 
 | ||||
| import "os" | ||||
| import "fmt" | ||||
| import "github.com/sashakoshka/arf" | ||||
| 
 | ||||
| func main () { | ||||
| 	if len(os.Args) != 2 { | ||||
| 		fmt.Println("XXX please specify module path and output path") | ||||
| 	} | ||||
| 
 | ||||
| 	inPath  := os.Args[0] | ||||
| 	outPath := os.Args[1] | ||||
| 	file := os.OpenFile(outPath, os.WRONLY | os.CREATE, 0655) | ||||
| 
 | ||||
| 	err := arf.CompileModule(inPath, outFile) | ||||
| 	if err != nil { | ||||
| 		fmt.Println(err) | ||||
| 		os.Exit(1) | ||||
| 	} | ||||
| } | ||||
		Reference in New Issue
	
	Block a user