Always use a slice., Dave Cheney

Golang Resources

Why Go?

https://qarea.com/blog/golang-web-development-better-than-python
https://hackernoon.com/5-reasons-why-we-switched-from-python-to-go-4414d5f42690
https://qarea.com/blog/ruby-vs-golang-comparison-best-solution
https://stxnext.com/blog/2017/09/27/go-go-python-rangers-comparing-python-and-golang/?utm_campaign=Pat&utm_medium=Social&utm_source=Quora
https://qarea.com/blog/why-do-enterprises-go-golang
https://www.quora.com/Googles-Go-language-vs-Python-which-would-you-prefer-to-use-and-why
https://qarea.com/blog/golang-development-vs-node-js-who-wins
https://www.freecodecamp.org/news/here-are-some-amazing-advantages-of-go-that-you-dont-hear-much-about-1af99de3b23a/
https://blog.golang.org/survey2018-results
https://www.quora.com/Why-are-while-loops-and-classes-absent-from-the-Go-programming-language/answer/Roman-Scharkov?ch=10&share=91dd1192&srid=hdP1T
https://www.quora.com/Why-does-Go-avoid-inheritance-and-provides-first-class-support-for-composition-instead/answer/Roman-Scharkov?ch=10&share=8429a5f0&srid=hdP1T

Getting Started (Up)

https://draft.dev/learn/technical-blogs/golang
https://www.quora.com/What-is-the-best-advice-for-a-beginner-who-wants-to-learn-Golang-as-a-first-language
http://devs.cloudimmunity.com/gotchas-and-common-mistakes-in-go-golang/
https://dave.cheney.net/practical-go/presentations/qcon-china.html
https://peter.bourgon.org/go-best-practices-2016/
https://dave.cheney.net/category/golang
https://github.com/emluque/golang-internals-resources
https://docs.google.com/document/d/1yIAYmbvL3JxOKOjuCyon7JhW4cSv1wy5hC0ApeGMV9s/pub
https://dev.to/seattledataguy/the-interview-study-guide-for-software-engineers-764
https://12factor.net/
https://itnext.io/tips-for-writing-self-documenting-code-e54a15e9de2
https://ueokande.github.io/go-slice-tricks/
https://bitfieldconsulting.com/golang/commandments

Multiple versions

https://www.pixelstech.net/article/1573366500-Maintain-multiple-versions-of-Go-in-one-single-environment

Directory Structure (Up)

https://medium.com/dm03514-tech-blog/go-aws-lambda-project-structure-using-golang-98b6c0a5339d

Error Handling (Up)

import "github.com/pkg/errors"
https://blog.carlmjohnson.net/post/2020/working-with-errors-as/
https://blog.logrocket.com/error-handling-in-golang/
https://www.youtube.com/watch?v=4WIhhzTTd0Y

Modules (Up)

Pick a different branch:

# by commit:
go get github.com/someone/some_module@af041234567
# by branch:
go get github.com/someone/some_module@mybranch

Clean cache:

go clean --modcache
https://github.com/golang/go/wiki/Modules
https://bogotobogo.com/GoLang/GoLang_Modules_1_Creating_a_new_module.php
https://stackoverflow.com/questions/53682247/how-to-point-go-module-dependency-in-go-mod-to-a-latest-commit-in-a-repo

OOP (Up)

https://www.oodesign.com
https://code.tutsplus.com/tutorials/lets-go-object-oriented-programming-in-golang--cms-26540

Constructors (Up)

https://pauldigian.hashnode.dev/advanced-go-choosing-between-a-constructor-and-declaring-the-type
https://medium.com/@j7mbo/constructors-in-go-b1d1513e1c1d

Design Patterns (Up)

https://refactoring.guru/design-patterns/go

Singleton

http://blog.ralch.com/tutorial/design-patterns/golang-singleton/ 

Factory

http://blog.ralch.com/articles/design-patterns/golang-factory-method/ 
https://www.sohamkamani.com/blog/golang/2018-06-20-golang-factory-patterns/

Others

https://medium.com/swlh/provider-model-in-go-and-why-you-should-use-it-clean-architecture-1d84cfe1b097
http://blog.ralch.com/tutorial/design-patterns/golang-design-patterns/
http://blog.ralch.com/articles/design-patterns/golang-decorator/ 
http://blog.ralch.com/articles/design-patterns/golang-adapter/ 
http://blog.ralch.com/tutorial/design-patterns/golang-bridge/ 
http://blog.ralch.com/tutorial/design-patterns/golang-composite/ 
http://blog.ralch.com/tutorial/design-patterns/golang-prototype/ 
http://blog.ralch.com/tutorial/design-patterns/golang-builder/ 
https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html 
https://github.com/bxcodec/go-clean-arch 
https://hackernoon.com/golang-clean-archithecture-efd6d7c43047 
https://dave.cheney.net/practical-go/presentations/qcon-china.html
http://www.golangpatterns.info/home
http://tmrts.com/go-patterns/

Repository Pattern

https://adodd.net/post/go-ddd-repository-pattern/
https://deviq.com/repository-pattern/

Publish - Subscribe

https://eli.thegreenplace.net/2020/pubsub-using-channels-in-go/
https://engineering.grab.com/plumbing-at-scale

Architecture & Best Practices (Up)

https://towardsdatascience.com/10-common-software-architectural-patterns-in-a-nutshell-a0b47a1e9013
https://github.com/OWASP/Go-SCP
https://doordash.engineering/2019/07/22/writing-delightful-http-middlewares-in-go/
https://dave.cheney.net/practical-go/presentations/qcon-china.html
https://www.joeldholmes.com/post/go-hex-arch/

SOLID (Up)

https://medium.com/swlh/improve-your-code-with-the-solid-principles-fcdcfdf21810

S - Single responsibility principle

https://medium.com/@felipedutratine/solid-single-responsibility-principle-in-golang-dc4a6be9bb3a

O - Open–closed principle

Modifying a package behaviour comes by adding new code, never by modifying the old one.

https://medium.com/@felipedutratine/solid-open-closed-principle-in-golang-3d23e8258a45

L - Liskov substitution principle

https://medium.com/@felipedutratine/solid-liskov-substitution-principle-fb01a3b51a68

I - Interface segregation principle

https://medium.com/@felipedutratine/solid-interface-segregation-principle-in-golang-49d4bbb4d3f7

D - Dependency inversion principle

https://en.wikipedia.org/wiki/Dependency_injection
https://www.captaincodeman.com/2015/03/05/dependency-injection-in-go-golang

Concurrency (Up)

https://www.youtube.com/watch?utm_campaign=Go+Full-Stack&utm_medium=email&utm_source=Revue+newsletter&v=S-MaTH8WpOM
https://blog.golang.org/race-detector
http://blog.ralch.com/articles/golang-concurrency-patterns-context/ 
https://www.ardanlabs.com/blog/2018/08/scheduling-in-go-part1.html
https://player.vimeo.com/video/49718712   # Rob Pike - "Concurrency Is Not Parallelism"
https://12factor.net/
https://medium.com/a-journey-with-go/go-how-does-go-recycle-goroutines-f047a79ab352
https://medium.com/@hau12a1/go-worker-pool-vs-pool-of-workers-b7c0598b4a67
https://www.alexedwards.net/blog/how-to-rate-limit-http-requests?utm_campaign=The%20Go%20Gazette&utm_medium=email&utm_source=Revue%20newsletter
https://www.youtube.com/watch?v=QDDwwePbDtw
https://medium.com/swlh/why-go-so-fast-1c4a20d15bde

Channels

https://medium.com/rungo/anatomy-of-channels-in-go-concurrency-in-go-1ec336086adb

Interfaces (Up)

http://www.golangprograms.com/golang/interface-type/
http://jordanorelli.com/post/32665860244/how-to-use-interfaces-in-go 
https://gobyexample.com/interfaces 
https://stackoverflow.com/questions/39092925/why-are-interfaces-needed-in-golang
https://medium.com/better-programming/how-i-build-robust-scalable-go-applications-192a0df32d1
https://www.efekarakus.com/golang/2019/12/29/working-with-interfaces-in-go.html
https://medium.com/@matryer/golang-advent-calendar-day-seventeen-io-reader-in-depth-6f744bb4320b
https://www.pixelstech.net/article/1588481241-How-to-check-whether-a-struct-implements-an-interface-in-GoLang

Data Structures and Algorithms (Up)

Arrays

https://www.golangprograms.com/go-language/arrays.html

Slices

https://www.youtube.com/watch?v=5o97pT9A1d4

Linked Lists

https://ieftimov.com/post/golang-datastructures-linked-lists/

Trees

https://ieftimov.com/post/golang-datastructures-trees/

BlockChain (Up)

https://dev.to/logrocket/how-to-build-a-blockchain-from-scratch-with-go-2875
https://medium.com/@mycoralhealth/code-your-own-blockchain-in-less-than-200-lines-of-go-e296282bcffc

JSON (Up)

https://www.sohamkamani.com/blog/2017/10/18/parsing-json-in-golang/
https://thehoard.blog/using-golang-and-json-for-kafka-consumption-with-high-throughput-4cae28e08f90

PR (Up)

https://medium.freecodecamp.org/what-i-learned-from-an-old-github-project-that-won-3-000-stars-in-a-week-628349a5ee14

Security (Up)

SSL

https://www.ssllabs.com/

Injection

https://www.calhoun.io/what-is-sql-injection-and-how-do-i-avoid-it-in-go/

Linters, Code Analysis, Style (Up)

Establishing good paradigms and consistent, accessible standards for writing clean code can help prevent developers from wasting many meaningless hours on trying to understand their own (or others') work.

Clean Code

https://github.com/Pungyeon/clean-go-article
https://www.youtube.com/watch?v=MzTcsI6tn-0

Linters

https://golangci.com
https://go-critic.github.io/overview.html

Static Code Analysis (SCA)

https://superhighway.dev/staticcheck-in-action

Style

https://medium.com/@dgryski/idiomatic-go-resources-966535376dba
https://github.com/dgryski/awesome-go-style
https://wiki.crdb.io/wiki/spaces/CRDB/pages/73072807/Git+Commit+Messages
https://github.com/uber-go/guide/blob/master/style.md
https://github.com/golang/go/wiki/CodeReviewComments#go-code-review-comments

Tutorial Series (Up)

https://golangbot.com/learn-golang-series/
https://semaphoreci.com/community/tutorials/building-and-testing-a-rest-api-in-go-with-gorilla-mux-and-postgresql

Functional (Up)

https://medium.com/swlh/functional-pipe-in-go-1c755467fe14
https://stackoverflow.com/questions/60102866/golang-trouble-understanding-a-function-as-a-receiver
https://kinbiko.com/posts/2021-01-10-function-types-in-go/

RDBMS (Up)

https://medium.com/@rocketlaunchr.cloud/canceling-mysql-in-go-827ed8f83b30
https://medium.com/avitotech/how-to-work-with-postgres-in-go-bad2dabd13e4

CI / CD (Up)

https://medium.com/@chemidy/create-the-smallest-and-secured-golang-docker-image-based-on-scratch-4752223b7324
https://blog.alexellis.io/inject-build-time-vars-golang/

Microservices (Up)

https://rubygarage.org/blog/top-languages-for-microservices
https://ewanvalentine.io/microservices-in-golang-part-2/
https://github.com/mfornos/awesome-microservices#go
https://martinfowler.com/articles/microservices.html
https://medium.com/better-programming/deploy-a-full-stack-go-and-react-app-on-kubernetes-4f31cdd9a48b

Pointers (Up)

http://piotrzurek.net/2013/09/20/pointers-in-go.html
https://www.youtube.com/watch?v=sTFJtxJXkaY

Context (Up)

https://dev.to/georgeoffley/working-with-context-in-go-75e
http://p.agnihotry.com/post/understanding_the_context_package_in_golang/
https://github.com/golang/go/wiki/ExperienceReports#context
https://medium.com/@cep21/how-to-correctly-use-context-context-in-go-1-7-8f2c0fafdf39
https://www.alexedwards.net/blog/how-to-manage-database-timeouts-and-cancellations-in-go

Memory Management (Up)

https://erik-engheim.medium.com/go-does-not-need-a-java-style-gc-ac99b8d26c60
https://povilasv.me/go-memory-management-part-2/#

(g)RPC (Up)

https://pmihaylov.com/grpc-with-go-crash-course/
https://blog.twitch.tv/twirp-a-sweet-new-rpc-framework-for-go-5f2febbf35f

Authentication (Up)

https://blog.ellation.com/managing-cpu-load-in-golang-515b9356bc5
https://dev.to/wagslane/how-to-build-jwt-s-in-go-golang-i7c

Testing (Up)

https://github.com/golang/go/wiki/TestComments#equality-comparison-and-diffs
https://blog.codecentric.de/en/2017/08/gomock-tutorial/
https://dave.cheney.net/2019/05/07/prefer-table-driven-tests
https://apitest.dev/
https://golang.testcontainers.org/
https://ieftimov.com/post/testing-in-go-dependency-injection/

Integration Testing

https://hackandsla.sh/posts/2020-07-12-golang-integration-testing/

Benchmarking (Up)

https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go
https://medium.com/justforfunc/analyzing-the-performance-of-go-functions-with-benchmarks-60b8162e61c6
https://blog.simon-frey.eu/known-length-slice-initialization-speed-golang-benchmark-wednesday?utm_campaign=The%20Go%20Gazette&utm_medium=email&utm_source=Revue%20newsletter

Templates (Up)

https://goinbigdata.com/example-of-using-templates-in-golang/
https://golangtutorials.blogspot.com/2011/06/go-templates.html
https://curtisvermeeren.github.io/2017/09/14/Golang-Templates-Cheatsheet
https://www.calhoun.io/intro-to-templates-p3-functions/
https://philipptanlak.com/web-frontends-in-go/
https://philipptanlak.com/mastering-html-templates-in-go-the-fundamentals/

Logging (Up)

https://blog.maddevs.io/how-to-start-with-logging-in-golang-projects-part-1-3e3a708b75be
https://dev-journal.in/2019/05/27/adding-uber-go-zap-logger-to-golang-project/
https://engineering.grab.com/structured-logging

Miscellaneous (Up)

https://medium.com/weareservian/automagical-https-with-docker-and-go-4953fdaf83d2
https://itnext.io/databases-behind-the-scenes-how-boltdb-saves-data-to-the-disk-de8f1e3feda6

Variables (Up)

GOSUMDB

https://flak.tedunangst.com/post/please-note-gosumdb-caches-410
https://www.ardanlabs.com/blog/2020/02/modules-04-mirros-checksums-athens.html

String Formatting (Up)

https://medium.com/swlh/ultimate-golang-string-formatting-cheat-sheet-234ec92c97da

High Performance (Up)

https://dave.cheney.net/high-performance-go-workshop/dotgo-paris.html
https://dave.cheney.net/high-performance-go-workshop/gophercon-2019.html
https://flaviocopes.com/golang-profiling/
https://github.com/dgryski/go-perfbook
https://github.com/alecthomas/go_serialization_benchmarks
https://developer20.com/using-sync-pool/index.html
https://bionic.fullstory.com/why-you-should-be-using-errgroup-withcontext-in-golang-server-handlers/
https://dev.to/codenation/profiling-golang-applications-using-pprof-1c7o
https://www.freecodecamp.org/news/how-i-investigated-memory-leaks-in-go-using-pprof-on-a-large-codebase-4bec4325e192/
https://www.aaronraff.dev/blog/an-introduction-to-producing-and-consuming-kafka-messages-in-go
https://blog.cloudflare.com/branch-predictor/
https://evilmartians.com/chronicles/what-could-go-wrong-with-a-mutex-or-the-go-profiling-story

Protocol Buffers

https://kpbird.medium.com/golang-serialize-struct-using-gob-part-1-e927a6547c00
https://blog.golang.org/gob
https://appliedgo.net/networking/

AWS (Up)

https://geekflare.com/aws-lambda-for-beginners/
https://docs.aws.amazon.com/lambda/latest/dg/lambda-golang.html
https://cloudnative.ly/lambdas-with-golang-a-technical-guide-6f381284897b
https://asanchez.dev/blog/deploy-api-go-aws-lambda-gateway/
https://asanchez.dev/blog/amazon-s3-v2-golang/
Owner
Tudor Hulban
Passionate about Golang and JavaScript with more than 15 years in IT.
Tudor Hulban
Similar Resources

An always-on framework that performs end-to-end functional network testing for reachability, latency, and packet loss

Arachne Arachne is a packet loss detection system and an underperforming path detection system. It provides fast and easy active end-to-end functional

Dec 31, 2022

This is a very simple web-app which simply always returns HTTP status code 200

Responder This is a very simple web-app which simply always returns HTTP status code 200. It will also wait for an amount of time which can be set in

Dec 14, 2021

Use Consul to do service discovery, use gRPC +kafka to do message produce and consume. Use redis to store result.

Use  Consul to do service discovery, use gRPC +kafka to do message produce and consume. Use redis to store result.

目录 gRPC/consul/kafka简介 gRPC+kafka的Demo gRPC+kafka整体示意图 限流器 基于redis计数器生成唯一ID kafka生产消费 kafka生产消费示意图 本文kafka生产消费过程 基于pprof的性能分析Demo 使用pprof统计CPU/HEAP数据的

Jul 9, 2022

A slice-based implementation of a stack. In Go!

Stackgo Stackgo is a slice-based implementation of a simple stack in Go. It uses a pre-alloc pagination strategy which adds little memory overhead to

Nov 3, 2022

Convert struct, slice, array, map or others for Golang

XConv zh-CN XConv is a golang type convertor. It convert any value between types (base type, struct, array, slice, map, etc.) Features Convert between

Dec 8, 2022

:100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving

Package validator Package validator implements value validations for structs and individual fields based on tags. It has the following unique features

Jan 1, 2023

Some helper types for go1: priority queue, slice wrapper.

go-villa Package villa contains some helper types for Go: priority queue, slice wrapper, binary-search, merge-sort. GoDoc Link: http://godoc.org/githu

Apr 24, 2021

A faster method to get elements from an interface (Struct or Slice type) for Go.

A faster method to get elements from an interface (Struct or Slice type) for Go.

May 13, 2022

Slice graph uses graphviz in order to pretty print slices for you.

slicegraph Slice graph uses graphviz in order to make you understand what happens underneath your slices.

Sep 22, 2022

💯 Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving

Package validator implements value validations for structs and individual fields based on tags.

Nov 9, 2022

Golang parameter validation, which can replace go-playground/validator, includes ncluding Cross Field, Map, Slice and Array diving, provides readable,flexible, configurable validation.

Golang parameter validation, which can replace go-playground/validator, includes ncluding Cross Field, Map, Slice and Array diving, provides readable,flexible, configurable validation.

Checker 中文版本 Checker is a parameter validation package, can be use in struct/non-struct validation, including cross field validation in struct, elemen

Dec 16, 2022

Slice and dice your TMUX windows and panes

Slice and dice your TMUX windows and panes

chaakoo Introduction Configuration Using Chaakoo Examples Download License Introduction Chaakoo is a wrapper over TMUX that can create sessions, windo

Nov 1, 2022

💪 Helper Utils For The Go: string, array/slice, map, format, cli, env, filesystem, test and more.

💪 Helper Utils For The Go: string, array/slice, map, format, cli, env, filesystem, test and more.

💪 Helper Utils For The Go: string, array/slice, map, format, cli, env, filesystem, test and more. Go 的一些工具函数,格式化,特殊处理,常用信息获取等等

Jan 6, 2023

Slice and dice your TMUX windows and panes

Slice and dice your TMUX windows and panes

Chaakoo is a wrapper over TMUX that can create sessions, windows and panes from a grid based layout. The idea here is inspired by the CSS grid template areas.

Nov 1, 2022

make slice items unique in go

make slice items unique in go

Jan 20, 2022

Go 1.18 Generics based slice package

The missing slice package A Go-generics (Go 1.18) based functional library with no side-effects that adds the following functions to a slice package:

Jan 8, 2023

Tiny Go tool for running multiple functions concurrently and collecting their results into an error slice.

Overview Short for "ConCurrent". Tiny Go tool for running multiple functions concurrently and collecting their results into an error slice. Dependency

Nov 22, 2021

A go Library for scan database/sql rows to struct、slice、other types. And it support multiple databases connection management

ploto A go Library for scan database/sql rows to struct、slice、other types. And it support multiple databases connection management It's not an ORM. wo

Nov 3, 2022

Wrap byte read options with uniform interface for io.Reader and byte slice

nibbler Nibble chunks from Reader streams and slice in a common way Overview This is a golang module that provides an interface for treating a Reader

Dec 23, 2021
Repo Tugas Basic Programming Part 4(Complexity Analysis, Array, Slice, Function) ALTA Immersive BE5

Cara mengerjakan tugas hari ke 4 clone project ini dengan cara git clone https://github.com/ALTA-Immersive-BE5/Basic-Programming-Part4.git setelah cl

Dec 15, 2021
Repo Tugas Basic Programming Part 3(Array, Slice, Function) ALTA Immersive BE5

Cara mengerjakan tugas hari ke 3 clone project ini dengan cara git clone https://github.com/jackthepanda96/Basic-Programming-Part3.git setelah clone

Dec 15, 2021
A generic two-dimensional matrix slice type in Go.

Grid The grid module and package provide a generic implementation of a two-dimensional matrix slice type. The API is inspired both by the standard Go

Nov 1, 2022
Tugas Alta Immersive Backend Golang Basic Programming Part 4(Complexity Analysis, Array, Slice, Function)
Tugas Alta Immersive Backend Golang Basic Programming Part 4(Complexity Analysis, Array, Slice, Function)

Tatacara Melakukan Setup Tugas clone project ini dengan cara git clone https://github.com/Immersive-Backend-Resource/Basic-Programming-Part4.git sete

Jan 9, 2022
Tugas Alta Immersive Backend Golang Basic Programming Part 3(Array, Slice, Function)
Tugas Alta Immersive Backend Golang Basic Programming Part 3(Array, Slice, Function)

Tatacara Melakukan Setup Tugas clone project ini dengan cara git clone https://github.com/Immersive-Backend-Resource/Basic-Programming-Part3.git sete

Jan 9, 2022
Open IM Demo Register Use Tutorial

Open-IM-Demo-Register Use Tutorial First step: Log in to this site: https://www.aliyun.com/product/sms Buy Short Message Service You will get accessKe

Mar 19, 2022
A basic helloworld golang web program , just for personal use

Standard Go Project Layout Overview This is a basic helloworld golang web progra

Aug 6, 2022
This slide deck and supporting material is part of the Introduction to Go training course by Dave Cheney

This slide deck and supporting material is part of the Introduction to Go training course by Dave Cheney.

Nov 14, 2022
sleuth checks that you declared a slice with length and you are trying append to the slice.

sleuth sleuth detects when an append is used on a slice with an initial size. Instruction go install github.com/sivchari/sleuth/cmd/sleuth Usage packa

Sep 15, 2021
So you always leave a note
So you always leave a note

jWalterWeatherman Seamless printing to the terminal (stdout) and logging to a io.Writer (file) that’s as easy to use as fmt.Println. Graphic by JonnyE

Dec 19, 2022