Skip to content
Go back

Go Notes

##Table of contents

Big Concepts

Go has types (everything is a type), and behavior emerges from methods and interfaces, not from classes.

[!TIP] bar baz

Composition over Inheritance

There’s only structs, interfaces. Composition over inheritance. Implicit interfaces allows for dependency injection; in other words, no coupling at all. Behavior is completely separated.

*
&

Pointers are values and references semanitcs are explicit

Explicit error handling

Errors are values (if err != nil), no exceptions.

Simplicity over expressiveness

Fewer language features, predictable code.

Concurrency is built-in

Goroutines and channels are first-class.

Small, behavior-focused interfaces

Interfaces define what you do, not what you are.

Tooling is part of the language

go build, go test, go fmt, go mod are standard.

Readability and uniform style

gofmt enforces consistency.

Fast compile, simple runtime

Efficient binaries, GC, lightweight scheduling.


Share this post on:

Previous Post
Github Basics Notes
Next Post
Electrons