Uncomment main function

This commit is contained in:
Petar Kapriš 2025-01-15 21:09:56 +01:00
parent c6bde606d6
commit a647c39ec4

View file

@ -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)