Skip to content

ssjlee93/go-tutorials

Repository files navigation

go-tutorials

Go programming language tutorials go.dev tutorials

package structure

in the order of creation

  1. Getting started
  2. Create a module
  3. Tour of Go
    1. Basics
    2. Flow Control
    3. More Types
    4. Methods
    5. Generics
    6. Concurrency
  4. Getting started with multi-module workspaces
  5. Accessing relational database
  6. Developing a RESTful API with Go and Gin
  7. Getting started with generics
  8. Getting started with fuzzing
  9. Writing Web Applications with Go
  10. Blog : Strings, bytes, runes and characters in Go

Notes

packages

ideally, in a legitimate application 1 project would have 1 go.mod
similar to Java, you would have 1 entry point main.go and import packages to your necessary classes / go files.

Some observations I found :

  • each package does not need a separate go.mod file.
  • each package may contain unique variables and functions.
    • unlike Java where each class is independent, go files are not independent; go packages are independent.

multiple mains

GoLand IDE will not allow multiple package main lines in the project.
However, if you still place it and run the following, each file with main function can run.

go run <path-to-my-file-with-main>

About

Go / Golang tutorials

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published