Go equivalent of a void pointer in C

According to the Go Programming Language Specification:

A type implements any interface comprising any subset of its methods and may therefore implement several distinct interfaces. For instance, all types implement the empty interface:

interface{}

If you search within that document for interface{}, you’ll see quite a few examples of how you can use it to do what you want.

Leave a Comment