I am trying to translate some C code to Go and I'm wondering if there is a Go equivalent to the following linked list types:
typedef struct TOKENLIST {
token item;
struct TOKENLIST *next;
} token_list_elt, *token_list;
So far it appears that I would have to create both types separately like this:
type token_list struct {
item token
next *token_list
}
type token_list_elt struct {
item token
next *token_list_elt
}
This is not such a big deal for this example, but there are lots linked list types like these I need to translate and some of them have many aliases and/or struct fields.