Skip to main content

Learning GO : Basic

 

LEARNING GO

It’s My Learning Adventure

Intro

First of all I don’t have any experience in programming language called GO . I just notice it this month when I went to search for jobs online. There are a lot of company needed the experienced GO coder.

So this will be my own way learning GO. It’s not a tutorial but my own experience in learning a new things and hopefully this writing will be useful somewhere in the future.

Anyway I have experienced NodeJS and Pyhton so I don’t think this will be that hard.

Learning Plan

The learning method that I will use is...wait is there is any learning method ?. Anyway I just write what I usually do. So these are the plan on mastering GO.

1. Finding Resources

2. Setting up Environment

3. Start Coding

4. Find Web Framework in GO. Because that’s what I found in search for jobs

4.1 CRUD creation

4.2 Authorization and Authentication

4.3 User Management

5. Try to Host the web app. It’s free on IBM cloud https://cloud.ibm.com/

6. ….. I don’t know any. Maybe I post later.

1. Finding Resources

1. https://golang.org/ absolutely the basic. Read the Doc

2. Going search keyword : go web framework best. It seems there are a lot of them.

3. Going Github : https://github.com/avelino/awesome-go. There are a lot of them going open source.

I add later if I found one

2. Setting Up Environment locally

To start every coding journey always go for the original document. let’s visit https://golang.org/doc/ and start reading and reviewing.

2.1 Installing Go

There no difficult process in here. Just download and install. There is a link if you want to install different version https://golang.org/doc/manage-install.html. Its nice to have option, I’m using windows btw.

2.2 Review for Tutorial: Get started with Go

After coding a bit in Visual Studio Code, The IDE starting to install few tools to add. But found error. It didn’t found asm. The problem occurred when the IDE try to instal tools but got rejected by my Antivirus. So I have to exclude the Go Installation directory from my Antivirus.



It’s been 5 minutes, and I didn’t found any solution so going to repair the installation. After repair installation the all tools are installed perfectly without error



that was a good thing we found an error, so lucky me.

Following the Hello World.

Hello.go file work just fine.

Review for Call code in an external package

This one also work fine, and the description for installing other modules is quite interesting.

2.3 Review for Tutorial: Create a Go module

2.3.1 Creating Module that other can use

Creating Module works fine

2.3.2 Call Module

After executing go build found some error



search from google I found that it’s a new issue





I didn’t know everyone having the same problem.

But luckily someone already have the answer


so you should put hello directory outside greeting directory so its at the same level. Thank you good sir.

I found out that I miss these part I guess. When I look again in tutorial, it really says go up from greetings directory



after this the other tutorial works fine.

2.3.3 Review for Compile and install the application

This part is very interesting for me, so I can install the application as part of OS. And yeah I just noticed this now.

2.4 Basic Tutorial Done

With this I officially can use Go, and also enter the basic zone as Go Programmer. Next I will try the web framework. Since there are a lot of framework. I will start with something popular. Thank you if you are reading this. I think it will not add to your knowledge if you already have a Go Project on your hands but thanks anyway.


Comments

Popular posts from this blog

JavaScript Real Time Calculation

I've been around looking for javascript that can do Real Time Calculation. javascript real time calculation, javascript real time calculation textbox. by some lucky keywords i found this code. this is exactly the code that i want. it really do the real time calculation. and it doesn't need onChange or OnBlur function. Just try it Example + = this is the javascript code <script type='text/javascript' > function startCalc(){   interval = setInterval("calc()",1); } function calc(){   one = document.autoSumForm.firstBox.value;   two = document.autoSumForm.secondBox.value;   document.autoSumForm.thirdBox.value = (one * 1) + (two * 1); } function stopCalc(){   clearInterval(interval); } </script> this is the html code <form name="autoSumForm">   <input class="right" type=text name="firstBox" value="" onFocus="startCalc();" onBlur="stopCalc();"><br...

iOS 5 Creating eCommerce with Shopping Cart App Part 1

[Created 11-28-2012] it seems like there are tons of tutorial ios and xcode for beginner out there. you can view the list at my post here http://javalearning-adventure.blogspot.com/2012/11/learning-xcode.html that's the link that i always update if i find anything. this tutorial will consist of step by step in creating Shopping Cart App. There will be Browse Product, Shopping Cart, and Checkout Method. I will update these later after i satisfied with the end result. These tutorial will also include web programming using php. but these php will only using basic sample not the very complex with mysql database and everything. these php pages will only creating json output. i think you don't need to learn php and json. you should only learn how to handle json using objective-c. I am still a beginner in xcode and objective-c, its still only 1 month since i started these tutorial. requirements suppose to be iOS 5 with xcode 4. [i will update these later][postponed...

BlackBerry ListField Tutorial Part 3

This Part 3 will consist of Networking, ListField, JSON and Thread. I'm really sorry for pending this part 3. I've been busy making money and still failed. Its just really hard to live in third world country by coding. anyway, There are few Library that you will need creating ListField with JSON data, but we wont touch that area first. we need to learn the basic. * note added : Aug 26 2013 The basic should be : Networking Thread ListField [if i find anything, will be add here]