We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
package main import ( "fmt" "github.com/kr/pretty" ) type A struct { B *B } type B struct { M map[string]string } func main() { a := &A{B: &B{M: map[string]string{}}} fmt.Printf("%# v\n", pretty.Formatter(a)) //prints out /* &main.A{ B: &main.B{ M: {}, }, } */ //This contains a syntax error c := &A{ B: &B{ M: {}, }, } }
The text was updated successfully, but these errors were encountered:
This line M: {} gives the error: missing type in composite literal
M: {}
missing type in composite literal
Sorry, something went wrong.
I would really love to be able to print valid go source.
This problem is also present for slices of structs and non empty maps.
first commit
a1c5365
This tool is really quite useful. Good work.
I was also wondering, like above, if you plan to fix this soon?
No branches or pull requests
The text was updated successfully, but these errors were encountered: