Almost all macro functions to provide ease of use, using go2hx code in a Haxe manner.

Static variables

@:value(new sys.thread.Mutex())staticglobalMutex:Mutex = new sys.thread.Mutex()

@:value(0)staticgoroutines:Int = 0

@:value(new sys.thread.Mutex())staticgrMutex:Mutex = new sys.thread.Mutex()

@:value(null)staticrecover_exception:AnyInterface = null

Where the recover_exception is stored in case recover is called.

Static methods

staticasInterface(expr:Dynamic):Dynamic

Create a simulated Go interface in Haxe, check if type with suffix _asInterface exists, and if so generate the type on the fly.

Parameters:

expr

Returns:

Expr

staticdefaultValue(e:Dynamic):Dynamic

Create a default Go value for an Expr.

Parameters:

e

Returns:

Expr

staticexpectedValue(value:Dynamic):Dynamic

Used in rare cases where Go compiler does not give type information for a type or is not possible and the job is handed off to the Haxe compiler.

Parameters:

value

Returns:

Expr

staticfromAsInterfaceToValue(value:Dynamic):Dynamic

staticmax(expr:Dynamic):Dynamic

staticmin(expr:Dynamic):Dynamic

staticpointer(expr:Dynamic, hasSet:Dynamic):Dynamic

Create a simulated Go pointer in Haxe

Parameters:

expr
hasSet

Returns:

Expr

staticprint(args:Rest<Dynamic>):Void

Simulate builtin print

Parameters:

null

args

staticprintln(args:Rest<Dynamic>):Void

Simulate builtin println

Parameters:

null

args

staticroutine(func:() ‑> Void):Void

staticsetRef(expr:Dynamic):Dynamic

Create a Ref (simulated Go pointer but for a Haxe type that is pass by ref) regardless if the type is null or not.

Parameters:

expr

Returns:

Expr

statictoInterface(expr:Dynamic):Dynamic

Create a simulated any/interface{} type

Parameters:

expr

Returns:

Expr stdgo.AnyInterface

statictypeAssert(expr:Dynamic):Dynamic

Assert that a type is the checkType complexType, if not throw.

Parameters:

expr

must follow the format ($expr: $ct)

Returns:

Expr

statictypeEquals(expr:Dynamic):Dynamic

Check if type is equal to the checkType complexType.

Parameters:

expr

must follow the format ($expr: $ct)

Returns:

Expr Bool