Intelligent snippets using tree-sitter

7 · Abin Simon · Oct. 16, 2021, 11:51 a.m.
I found myself writing a lot more go these days. So far I like the language even thought it seems way too simple at times. That said, one thing that I found a bit annoying was how I had to write all those default values when we have to return an error. I really liked how Rust handed errors, but yeah. In this article I wanted to introduce a snippet that I use which will automatically fill in that if err != nill thing in your go program with all the proper return values for you. I actually got thi...