Type interface {} does not support indexing

you’re passing a pointer to a slice or map in a function, and when referencing an item with *variable[0], you get that error.

type interface {} does not support indexing

The solution is simple: instead of using

*variable[0]

use

(*variable)[0]