Send an email in Go with smtp.SendMail

I wanted to send an email from my TraceLog package when a critical exception occurred. Fortunately Go’s standard library has a package called smpt which can be found inside the net package. When you look at the documentation you are left wanting. I spent 20 minutes research...

Go's time.Duration Type Unravelled

I have been struggling with using the Time package that comes in the Go standard library. My struggles have come from two pieces of functionality. First, trying to capture the number of milliseconds between two different time periods. Second, comparing that duration in millisecon...

Understanding Defer, Panic and Recover

I am building my TraceLog package and it is really important that the package logs any internal exceptions and prevents panics from shutting down the application. The TraceLog package must never be responsible for shutting down an application. I also have internal go routines tha...

Documenting Go Code With Godoc

As you know if you read my blog, I have been building a set of new utility packages so I can start developing an application server I need for a new project. I am brand new to Go and the Mac OS. Needless to say it has been one hell of an education over the past month. But I don&r...

Riding a MS Network with Linux

I work in a company that have an enterily MS-based network, which means, all that domain login crap and everything that comes with it: outlook, MS Communicator, proxies, monitoring and etc. I particurarly hate to use MS Windows anytime, even more for work. So, I installed an Ubun...

Installing Go, Gocode, GDB and LiteIDE

Check out my new installtion document: https://www.ardanlabs.com/blog/2016/05/installing-go-and-your-workspace.html I removed the sections about gocode and GDB. These are not necessary any longer. I also added links for more editors. Windows This is a great post by Wade Wegner fo...

Thread Pooling in Go Programming

After working in Go for some time now, I learned how to use an unbuffered channel to build a pool of goroutines. I like this implementation better than what is implemented in this post. That being said, this post still has value in what it describes. https://github.com/goinggo/wo...

Why Go Programming

For the past 20 years I have been writing server based and application software on the Microsoft stack. First in C/C++ leveraging the Win32 API and then in C# when .Net first was released. Over the past few months I have realized that trying to build scalable code on the Microsof...

Git Protips™

Git has a lot of features, and I bet that 90% of who use it (including me) doesn’t know half of them. Well, maybe, someday, one of those “unknown features” can “save your life”. So, I decided to compile a small list of useful git commands, tips and t...

Gemify your assets

Rails 3.1 introduced the asset pipeline, which make it easy to include versioned external assets as application dependencies. Probably you will find almost any JS library you want, already Gemified, but, if it is not the case, you can Gemify those libraries by your own, and I can...