V Forum

[ log in ]

Listing all fields and methods of object

sandeepyadavhas Mar 14 18:05
I want to use reflect to find fields of an object, and it's built-in/user defined methods to better aid in autocomplete.
Below code does not work for some reason.
I'm new to the language and haven't read complete documentation.

for field in string.fields {
println(field.name)
}

Can a
nyone help, I want to know methods and fields of a type in REPL.
Even better if I can get method signatures as well.



Powered by Vorum, open-source blogging/forum software written in V