Groups
Groups
Sign in
Groups
Groups
golang-nuts
Conversations
About
Send feedback
Help
Print error message
199 views
Skip to first unread message
Tong Sun
unread,
Dec 9, 2014, 1:14:47 PM
12/9/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Hi,
How to print out error message?
I tried
Printf("\v\n", err)
or
Printf("\v\n", err.Error())
but both gave me garbage output:
%!(EXTRA *errors.errorString=
%!(EXTRA string=
So? Please help.
PS. the err is from:
table, err := table.Get(conn, sql)
Thanks!
John C.
unread,
Dec 9, 2014, 1:41:02 PM
12/9/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
You want %v instead of \v in the format string.
Reply all
Reply to author
Forward
0 new messages