Uncomment main function
This commit is contained in:
parent
c6bde606d6
commit
a647c39ec4
1 changed files with 10 additions and 10 deletions
|
@ -10,16 +10,16 @@ import (
|
|||
"git.bonsai.cool/kayprish/pj1/pj1-go/util"
|
||||
)
|
||||
|
||||
// func main() {
|
||||
// if len(os.Args) > 2 {
|
||||
// fmt.Println("Usage: pj1-go [script]")
|
||||
// os.Exit(64)
|
||||
// } else if len(os.Args) == 2 {
|
||||
// runFile(os.Args[0])
|
||||
// } else {
|
||||
// runPrompt()
|
||||
// }
|
||||
// }
|
||||
func main() {
|
||||
if len(os.Args) > 2 {
|
||||
fmt.Println("Usage: pj1-go [script]")
|
||||
os.Exit(64)
|
||||
} else if len(os.Args) == 2 {
|
||||
runFile(os.Args[0])
|
||||
} else {
|
||||
runPrompt()
|
||||
}
|
||||
}
|
||||
|
||||
func runFile(path string) {
|
||||
bytes, err := ioutil.ReadFile(path)
|
||||
|
|
Loading…
Add table
Reference in a new issue