πFile Setup & Hello World
Starting a File
Gauntlet mirrors Go's package-based compilation model. As such, every file must start with package <name>.
Importing and Using Modules
Gauntlet's import syntax is:
import "<modulename>" as <aliasname>It is required that you give an alias to every module you import.
Once you have imported it, you can use it like you normally would in Golang.
If you imported fmt as such:
import "fmt" as fmtThen you must access it using whatever is on the right side of the "as" keyword (fmt):
fmt.println("Hello World!")The "main" Function
The main function is the entry point of every Gauntlet program; it is not required in every file. It must have a return type of Unit.
Working Hello World Example
Last updated