Go

Be aware about ignoring error in Go

that can take all of your time.

Donald Le
Oct 28, 2020

--

So recently I met a issue which is the number of objects I got when parse XML is different with the actual response from the API.

Turns out it is different because of error when parsing content due to conflict of different types.

The code cause error:

_ = xml.Unmarshal(bodyBytes, &summaryIDsXml)

We definitely should catch or print the error

err =…

--

--

Donald Le

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.