-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add debug.List #9148
Comments
Hello @bep, lets assume the following is the struct
Then, is |
@mohsalsaleem to be more precise: type Address {
Street string
City string
}
type User struct {
Name string
Address Address
foo string
}
func (u *User) M1() string
func (u *User) M3() string
func (u *User) M2(v string) string
func (u *User) m4(v string) string For
As in, only the exported fields and methods. The above would some less than useful entries for the end user, but so be it. For |
Thanks for the explanation @bep. |
Hello @bep can i work on this issue ? |
Is this issue end-of-life? |
…abstraction gohugoio#9148 and rebased gohugoio#10806
See https://discourse.gohugo.io/t/advice-on-how-to-inspect-a-page-context/35504/4
I suggest we add a
debug.List
method that uses reflection to list all fields and method names on structs/pointers, or all keys if it's a map -- non-recursive; returning a string slice would be good, I think (it prints nicely).The text was updated successfully, but these errors were encountered: