Note that many values are currently missing. Only a minimum set has been implemented – just beyond enough for the standard compiler tests to pass. Please feel free to contribute any that you have implemented yourself (via a pull request).
- Run your code through
gofmt - Use provided type alias
Anyinstead ofinterface{} - Use provided type alias
Dictinstead ofmap[string]Any(intended for when you're dealing with ps records) - Use provided type
[]Anyfor arrays - For input parameters used as-is (i.e. when no type assertion from
Anyis necessary), simply use a name without a trailing underscore.- For example:
exports["foo"] = func(bar Any) Any { return bar }
- For example:
- If you need to create a local variable from an argument type assertion (for readability, performance, etc.), name the parameter with a trailing underscore. Then create a type-inferred variable declaration with assignment, with the trailing underscore removed from the name.
- For example:
exports["foo"] = func(bar_ Any) Any { bar := bar_.(int) ... }