Skip to content

dhairya-rathod/golang-learning

Repository files navigation

GoLang Learning

Data types

Go's basic types are' string, Integer int32, int64, Boolean bool, Float float32, float64More details here

Variable

The var statement declares a variable. There can be package level variables or function level variables (In other words scope of the variable can be package or function).  More details here

Constants

Constants are declared like variables, but with the const keyword. Contain values that never change during execution of program or are immutable.  More details here

Arrays

In Go, an array is a numbered sequence of elements of a specific length.  More details here

Slices

Slices are an important data type in Go, giving a more powerful interface to sequences than arrays.  More details here

Slicing

Go allow us to slice a slice or an array which is called slicing.  More details here

String Slicing | Substring method

Go allow us to slice a string also.  More details here

Map Data Structure

Map data structure in go is used to store key-value pair.  More details here

Struct

Go struct allow us define our own custom data type.  More details here

If/Else

Go allow us create conditional statement using if/else.  More details here

Variable Scope

Go has package, function and block level scope.  More details here

Loops

Go has only for loop which is capable of replicating for, while and do-while loop.  More details here

Statement | Label

Some of the control flow statement supported by golang are break, continue, label and gotoMore details here

Switch

Like other languages break statement is not required at the end of each case in golang.  More details here

Function

In golang main function is an entrypoint. It takes no params also return nothing.  More details here

Pointers

Pointer is a variable that stores the memory address of a value.  More details here

About

Learn golang by examples.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages