Print error message

199 views
Skip to first unread message

Tong Sun

unread,
Dec 9, 2014, 1:14:47 PM12/9/14
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 PM12/9/14
to golan...@googlegroups.com
You want %v instead of \v in the format string.
Reply all
Reply to author
Forward
0 new messages