golang / gddo

Go Doc Dot Org
https://godoc.org
BSD 3-Clause "New" or "Revised" License
1.1k stars 266 forks source link

minor syntax error in example that casts error to googleapi error #602

Open Nixarn opened 5 years ago

Nixarn commented 5 years ago

Minor syntax error. In the example that casts errors to googleapi errors it says:

if e, ok := err.(*googleapi.Error); ok { if e.Code = 409 { ... } }

It should be "e.Code == 409"

urandom2 commented 5 years ago

Can you provide a link to where this should be fixed? Also, I would imagine that this change needs to be merged into the target repo?

jackwilsdon commented 5 years ago

Looks like it's here, coming from this file.

This doesn't seem to be a problem with gddo, as the mistake is within Google's documentation.