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>

Learning Odoo 13 Module Development and Review

USING ODOO 13 Introduction This writing supposed to be a cheat sheet for helping myself to learn about Odoo, Odoo Development and also anyone who want to read this.   Odoo already have a good documentation in their websites you can check it here https://www.odoo.com/documentation/13.0/ What you need Odoo source you can get the source from odoo.com or github https://www.odoo.com/page/download or https://github.com/odoo/odoo. Right now I'm using the  https://www.odoo.com/page/download  . I did using the github twice so I'm already familiar with it but now i want to explore something new and maybe we will find something. Python v3.6++ (intermediate level). https://www.python.org/downloads/windows/ You can learn some basic “web development with python” first if you still new at programming. Search with google. Postgresql https://www.postgresql.org/download/ I’m using win Os for development and Visual Studio Code for IDE What should you re

BlackBerry ListField Tutorial Part 2

Blackberry ListField with Clicked Row this time i create based on rtm4bb code. it used manager as TableRowManager to create the field for each row. first i create MenuListField.java