Golang News http://golangnews.com Jobs, Code, Videos and News for Go hackers - everything about the go programming language Sat, 04 Aug 2018 21:21:00 +0000 Code boilerplate, is it always bad? #errors #python 13 points posted by kenny https://medium.com/@shazow/code-boilerplate-is-it-always-bad-934827efcfc7 2163 Wed, 03 May 2017 19:49:00 +0000 Proposal: A built-in Go error check function, try #errors <p>We propose a new built-in function called <code>try</code>, designed specifically to eliminate the boilerplate <code>if</code>&nbsp;statements typically associated with error handling in Go. No other language changes are suggested. We advocate using the existing <code>defer</code>&nbsp;statement and standard library functions to help with augmenting or wrapping of errors. This minimal approach addresses most common scenarios while adding very little complexity to the language. The <code>try</code>&nbsp;built-in is easy to explain, straightforward to implement, orthogonal to other language constructs, and fully backward-compatible. It also leaves open a path to extending the mechanism, should we wish to do so in the future.</p> 12 points posted by kenny https://github.com/golang/proposal/blob/master/design/32437-try-builtin.md#proposal-a-built-in-go-error-check-function-try 3992 Wed, 05 Jun 2019 05:52:00 +0000 Handling http request errors in go #errors 9 points posted by kenny http://www.metabates.com/2015/10/15/handling-http-request-errors-in-go 1455 Tue, 03 Jan 2017 14:27:00 +0000 Error Handling in Go #tutorials #errors 8 points posted by geekme https://golangbot.com/error-handling 2850 Thu, 26 Oct 2017 18:36:00 +0000 Error handling and where go 2 gets it wrong #errors 6 points posted by gopher https://scene-si.org/2018/09/18/error-handling-and-where-go2-gets-it-wrong 3569 Tue, 18 Sep 2018 13:32:00 +0000 Fixing the billion dollar mistake in go by borrowing from rust #nil #pointer #error 6 points posted by gopher https://getstream.io/blog/fixing-the-billion-dollar-mistake-in-go-by-borrowing-from-rust 3433 Thu, 12 Jul 2018 15:06:00 +0000 problem - A go library that implements application/problem+json #web #error problem - A go library that implements application/problem+json 5 points posted by Matthias Schneider https://github.com/mschneider82/problem 4065 Mon, 05 Aug 2019 11:38:00 +0000 Don't just check errors, handle them gracefully #errors 5 points posted by gopher http://dave.cheney.net/2016/04/27/dont-just-check-errors-handle-them-gracefully 800 Fri, 29 Apr 2016 10:43:00 +0000