You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current custom go data printing style "%#v" show all data in a single line, which is not easy to read, especially in a debugging process.
"%#v":
fmt_test.Z{G:fmt_test.Y{D:fmt_test.X{A:123, B:""b" = 1"}, E:[]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, F:[2]string{"aaa", "bbb"}}, H:"zzz", I:[]string{"c:\x\y\z", "d:\a\b\c"}, J:map[string]int{"abc":456}}
I have made a patch to use "%@#v" "%@+v" to format a value with indented-multi-lines style string to extends "%#v" "%+v".
I expect this feature can be accepted by go team, and it will be my pleasure to contribute this patch to go repository.
The text was updated successfully, but these errors were encountered:
vipally
changed the title
fmt: use "@" verb to format a value with pretty(indented-multi-lines) style string
fmt: use "@" verb to format a value with pretty style(indented-multi-lines) string
Dec 22, 2017
vipally
changed the title
fmt: use "@" verb to format a value with pretty style(indented-multi-lines) string
fmt: use flag "@" to format a value with pretty style(indented-multi-lines) string
Dec 23, 2017
vipally
changed the title
fmt: use flag "@" to format a value with pretty style(indented-multi-lines) string
fmt: add flag "@" to format a verb ‘v’ value with pretty style(indented-multi-lines) string
Dec 23, 2017
vipally
changed the title
fmt: add flag "@" to format a verb ‘v’ value with pretty style(indented-multi-lines) string
fmt: add flag "@" to format a verb "v" value with pretty style(indented-multi-lines) string
Dec 23, 2017
…ed-multi-lines) string (#7)
fmt: add flag "@" to format a verb "v" value with pretty style(indented-multi-lines) string #2
Current custom go data printing style "%#v" show all data in a single line, which is not easy to read, especially in a debugging process.
I have made a patch to use "%@#v" "%@+v" to format a value with pretty style(indented-multi-lines) string to extends "%#v" "%+v".
refer golang#23026
Current custom go data printing style "%#v" show all data in a single line, which is not easy to read, especially in a debugging process.
"%#v":
fmt_test.Z{G:fmt_test.Y{D:fmt_test.X{A:123, B:""b" = 1"}, E:[]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, F:[2]string{"aaa", "bbb"}}, H:"zzz", I:[]string{"c:\x\y\z", "d:\a\b\c"}, J:map[string]int{"abc":456}}
I have made a patch to use "%@#v" "%@+v" to format a value with indented-multi-lines style string to extends "%#v" "%+v".
I expect this feature can be accepted by go team, and it will be my pleasure to contribute this patch to go repository.
Branch
Example
here is the expected example
Branch
Example
The text was updated successfully, but these errors were encountered: