Re: [go-nuts] printing a struct fields that implements an error interface

2018-02-18 Thread Jamil Djadala
On Sat, 17 Feb 2018 16:05:42 -0800 (PST) Joseph Lorenzini wrote: > Hi all: > > Per documentation: > > "If an operand implements the error interface, the Error method will > be invoked to convert the object to a string, which will then be > formatted as required by the verb

Re: [go-nuts] printing a struct fields that implements an error interface

2018-02-18 Thread Jan Mercl
On Sun, Feb 18, 2018 at 1:06 AM Joseph Lorenzini wrote: > Is there anyway to force fmt.Print to output the struct fields, even when it implements the error interface? What exactly do you mean by "to output the struct fields"? -- -j -- You received this message because

[go-nuts] printing a struct fields that implements an error interface

2018-02-17 Thread Joseph Lorenzini
Hi all: Per documentation: "If an operand implements the error interface, the Error method will be invoked to convert the object to a string, which will then be formatted as required by the verb (if any)" And this is so even if the struct implements the stringer interface. So if I print the