bmacrevolution bmacrevolution - 1 year ago 302
C Question

What is the Golang equivalent of a void pointer

I am already familiar with C and I've been working on improving my Golang skills. Anyone know how to create something reminiscent of a void * in Golang?

For example:

struct Node {
void *data;
struct Node *next;
struct Node *prev;

Answer Source

You have to use an empty interface, (interface {}), and modify it to what you want. (Source). This is known as an empty interface, and it can embody any type.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download