i have this snippet of code that use an iterator on a list
for x:= range s.faces.Iter(){
x.Render()
}
as the compiler points, x is of type interface{} and there isn't a method (i interface)Render() defined in my code.
changing to
for x:= range s.faces.Iter(){
x.(faceTri).Render()
}
compile, because there is a method func (f faceTri) Render() but upon execution this runtime error is raised:
panic: interface conversion: interface is *geometry.faceTri, not geometry.faceTri
(geometry is the package)
so, anybody can point me to a resource that explain the go way to use iterators + casting?