Test using struct type in Go

Added a util method supported by tests to work with custom struct type