All pages in tagged with #Golang


Make PHP More Useable - Returning Multiple Values from Functions

Use Golang inspired pattern to easily return multiple values from PHP functions.

Thursday Jul 16, 2015 — 2 minute read — 395 words

If you’ve ever used Go it’s hard to not find returning multiple values from functions conspicuously absent in other languages. In this case, we’ll look at a simple way to implement the same design pattern effectively in PHP. Why It’s Useful So why return multiple values from a function anyway? If you’ve never used Golang or a similar language which allows that, it may not be readily obvious. Most use-cases in Golang are centered around errors, so it’s very easy to check if a function encountered a error.

Read More


Golang Hot Code Reloading

Developing golang code with automatic hot reloading on Ubuntu

Saturday Jan 10, 2015 — 3 minute read — 631 words

When developing server code in Go, it can be a bit of a pain to compile and restart the servers constantly. While some frameworks do this for you automatically, you may not be using such a framework. Then what? Thankfully, the solution is quite simple. It should only take a few minutes to get up and running with this, and all your future hacking on Golang powered servers will be a lot easier.

Read More