Unfortunately, this doesn’t work for my example above. See the output below:
#...
using .Test
function getDocString(g::Symbol)
# return Docs.doc(Docs.Binding(Test, g)) # Also doesn't work
return Docs.doc(Docs.Binding(Main, g))
end
println(getDocString(:g))
Using this in the example script above, I get the error:
No documentation found.
Binding `g` does not exist.