Skip to content

Commit

Permalink
golang: fix arg number check
Browse files Browse the repository at this point in the history
  • Loading branch information
tbmc committed Jun 4, 2024
1 parent 9672817 commit db63f19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion golang/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func main() {
fmt.Println("Brainfuck Interpreter")

if len(os.Args) == 0 || strings.ToLower(os.Args[1]) == "serve" {
if len(os.Args) < 2 || strings.ToLower(os.Args[1]) == "serve" {
server.Serve(3001)
} else {
filePath := os.Args[1]
Expand Down

0 comments on commit db63f19

Please sign in to comment.