9Pointer is a variable that stores the memory address/register of the variable. If you extract the pointer variable without the asterix(*) sign, you will only get the register of the variable. In order to get the value you need to de-reference the pointer variable by using the asterix(*).
While array in Go is fixed size, slice on the other hand is not. You declare a variable without specifying the size, and if new element is needed use the append() function to add element to each index.
Array is fixed in size hence it is not flexible, I need to declare the size of the array, and the values cannot exceed the size which I declared.
Go has some similarity with python and a lot are different, fortunately during my university I was forced to take up foundation of programming which I have learned C. So below are the codes which I have put in comments to explain the statements. simplemath package Main package that imports simplemath and runs it
Background web client implementation is within the package net/http, this code uses this package to write an API client. Examples can be found in Golang. This API test website is used for testing the code. The endpoint which the code uses is /posts/1 as the json response is the shortest. Postman This is the response … Continue reading [Go] API client
My goal here is to learn one programming language and one scripting language. The scripting language which I am currently practising is python, and once I have enough experience in doing python I will learn Ruby on Rails. The programming language I am learning now is Go, what attracts me is its built-in concurrency by … Continue reading [Go] Starting with Go