Serving static files with golang or gorilla mux

Today, we are going to demonstrate how one could serve static site/ content using golang’s net/http or using gorilla/mux. Let us create base for this. First we would create a directory

2 min read

Interfaces in Golang

Golang implements interfaces as types and as collection of methods(specs for what should be considered of that type). Let’s first talk about collection of methods (specs that other types could implement)

2 min read

Go lang and MVC

Its been long since working with go language, been awesome experience so far. This post is regarding how one can structure go application in MVC structure like Rails. This example would be using Martini - A Golang MVC and Gorm - A Golang MVC, for demonstration purpose only.

3 min read

Go to Go - Struct and Methods

Go has a speciel type struct to define custome type with named fields. Struct act like collection of attributes/properties similar to classes in OOPS languages out there, but not exactly.

2 min read

Go to Go - Packages

Go is modern language, so it has to take care of current software development practices; code reuse or DRY (Don’t Repeat Yourself) being one of them. In go code can be packed into modules and shipped. Lets look into how go uses packages.

1 min read

Go to Go - Concurrency Part#2

In last part, where we discussed Golang Concurrency, we talked about goroutines and channels. As discussed there is much more to channels, liked channel direction, by default a channel is bi-directional, but it can be restricted to sending or receiving.

1 min read

Go to Go - Concurrency Part#1

Go came to existance to solve problems being faced by today’s software, one of them is concurrency (ability to execute stuff in parallel while providing control and communication among them). To solve this go has provided goroutines to execute stuff in parallel.

2 min read