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

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

statictypeAssert(e:AnyInterface, toType:GoType):Any

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

Parameters:

expr

must follow the format ($expr: $ct)

Returns:

Expr

@:has_untypedstatictypeEquals(e:AnyInterface, t2:GoType):Bool

Check if type is equal to the checkType complexType.

Parameters:

expr

must follow the format ($expr: $ct)

Returns:

Expr Bool