[go-nuts] Beginner Questions about C shared library functionality

2019-11-20 Thread randomshinichi4869
While browsing the examples at https://golang.org/misc/cgo/ I noticed that a lot of them don't actually specify `package main`. Yet all the C shared lib tutorials say that all my exported code has to be in `package main`. I need to have some code translating between Go and C, do I really have to

[go-nuts] Code has OOP smells but I can't think of a better refactor

2019-09-03 Thread randomshinichi4869
First - I have a Node struct, which represents a network connection to a node. type Node struct { *apiclient.Node } func (c *Node) GetStatus() (status *models.Status, err error) func (c *Node) PostTransaction(signedEncodedTx, signedEncodedTxHash string) (err error) func (c *Node) GetTopBloc