Working with Matches in Golang vs LUA

Hi there!

I’ve been trying to learn building runtime code for Nakama in Golang. I’m trying to work off the LUA example in the godot-nakama-demo and I was able to convert the world_rpc.lua over to Golang, but I’ve hit a few barriers with the world_control.lua

The first and most major one is that it looks like the module/match object is being intiallized like this in LUA:

local world_control = {}

And I am not sure exactly how that would be done in Golang.

The other big issue I’ve been having which sort of builds off the previous is how to use Nakama’s build in fucntions with the module/match obect such as world_control.match_loop. Searching through, I think it may be something like: func (m *world_control) MatchLoop(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, dispatcher runtime.MatchDispatcher, tick int64, state MatchState, messages []runtime.MatchData) interface{} { but I am not so sure.

I have a few ideas of where and this is what I have so far. I want to make sure I am going in the right direction:

Any and all help is appreciated! Thank you in advanced!