A Go Journey - Part 1

Hello fellow coders, Merry Christmas and a Happy New Year!!

I am about to start a fresh project with Golang. I will update the blog through out the project.
Here I am going to create a simple blogging platform using Golang's micro-architecture just like I created using Laravel and Django.

I just started Golang.  As I understood it sofar, we can call it as a combination of C and Python programming languages.
It has the power of C with easy coding style like Python.
For me, the most weirdest thing is variable/function declaration in Go.
as an example, to define a string variable

var myname string = "sachith"

// function syntax

func myfunction() string {
         return "Hello World"
              }


a bit strange, isnt it? for variable definitions, there is a short method.
 myname := "sachith"

Golang's capabilities and performances are the main attraction for this relatively new language. Golang is not considered as an OOP language, but it has most of OOP capabilities hidden inside the language such as interfaces. To use class capabilities in Golang, we can use struct or type. They both similar. There are value receivers and pointer receivers (for updating). Data-structures such as arrays,maps. But commonly used datastructure is undoubtedly slices, which are similar to arrays.

So from here lets start Go coding...see you in the next part.. Happy Coding

Comments

Popular posts from this blog

Youtube-dl cheatsheet

Git mistakes - 1

Docker Development - Mistakes 1