Skip to content

nanofaroque/golang_basics

Repository files navigation

This project is for personal learning and documentation with resources.

Reading Materials

Basic Learning

Concurrency in action

Performance Caveats

Project Structure

alt text

Golang microservice with Kafka and MongoDB

Quick Note

Iterating over map:

for k, v := range m { 
    fmt.Printf("key[%s] value[%s]\n", k, v)
}
or

for k := range m {
    fmt.Printf("key[%s] value[%s]\n", k, m[k])
}

Declaration of Map:

  m := make(map[int]bool)

To get the data from map

  m[121]

Linked List

Creation:

list.New() 

Accessing element from the list:


type Node struct {
  row int
  col int
}

for e := l.Front(); e != nil; e = e.Next() {
		row := e.Value.(*Node).row
		col := e.Value.(*Node).col
}

Releases

No releases published

Packages

No packages published

Languages