Home » Tag Archives: Golang

Tag Archives: Golang

Golang – Optional Arguments for APIs

I was recently directed towards Dave Cheney’s article Functional options for friendly APIs where he shares his thoughts on designs for optional parameters in APIs. Dave ends with a proposal for functional arguments that are optionally passed to a type constructor. There is no question this design is superior to having a single constructor with lots of arguments. However: Dave’s ...

Read More »

Golang – The database/sql package

This post is part of a series where I do my best to organize my thoughts around Go: its paradigms and usability as a programming language. I write this as a Java programmer that respects the principles of Elegant Objects. I am studying the Go Code Review mantra Accept Interfaces, Return Structs and was inspired to write this post after ...

Read More »

Golang – Smarter containers

This post is part of a series where I do my best to organize my thoughts around Go: its paradigms and usability as a programming language. I write this as a Java programmer that respects the principles of Elegant Objects. I wish to make a correction in this post. I want to focus on this statement: Products is not a ...

Read More »

Value of pass by value in GoLang

Now we are getting in some of the core concepts! As we know, it is very important to understand the impact that Go program will have on the machine. Everything is passed by value in Go, no matter what you pass. What you see is what you get. Each go routine (i.e path of execution) get Stack, which is a ...

Read More »

How Go lang struct works

This is the 3rd post of my Go lang experiment,. If you want to read the earlier posts then go to: is-it-worth-learning-golang what-are-golang-types Struct are cool types. It allows to create user defined type. Struct basic Struct can be declared like this type person struct { firstName string lastName string } this declares struct with 2 fields. Struct variables can ...

Read More »

Is it worth learning Golang ?

I was looking for a new language to learn and Go seemed a very good candidate. It is getting popular due to its simplicity and power.  It is created by some of the best minds of our industry Robert Griesemer  – Google V8 javascript engine, Java hotspot virtual machineRob Pike -UNIX and co creator of world most popular character encoding ...

Read More »

What are Golang Types

Go is a strongly typed language and type is life. This language has rich types and good support for extension of type. Type provides integrity. In this post I will share some of the primitive types and how Go handles them. Everything is 0 or 1 in computer and only these 2 values are used to represent any values we ...

Read More »

Comparing Golang with Java

First of all I would like to make a disclaimer. I am not an expert in Go. I started to study it a few weeks ago, thus the statements here are kind of first impressions. I may be wrong in some of the subjective areas of this article. Perhaps I will write some time a review of this one later. ...

Read More »