-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
36 lines (33 loc) · 831 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package main
import (
"os"
"github.com/sxmbaka/go-plgrd/general"
"github.com/sxmbaka/go-plgrd/playground"
"github.com/sxmbaka/go-plgrd/variables"
)
func main() {
// Get command-line arguments excluding the program name
args := os.Args[1:]
if len(args) > 0 {
switch args[0] {
case "variables", "var":
variables.TestAllOperations()
variables.TestAllVariables()
variables.TypeConversion()
variables.TypeInference()
variables.TestAllScopes()
variables.ShadowingVariables()
case "constants", "const":
variables.TestConstants()
case "iota":
general.TestIota()
case "playground", "p":
playground.Test()
default:
// Handle invalid command-line argument
println("Invalid argument")
}
} else {
// Handle no command-line argument to run all
}
}