├── .env.template ├── .gitignore ├── 00-module-package ├── calculator │ ├── multiply.go │ └── sum.go └── main.go ├── 01-variables └── main.go ├── 02-slice-map └── main.go ├── 03-struct-receiver └── main.go ├── 04-closure └── main.go ├── 05-interface └── main.go ├── 06-control └── main.go ├── 07-errors └── main.go ├── 08-generics └── main.go ├── 09-unit-test ├── main.go └── main_test.go ├── 10-logger └── main.go ├── 11-goroutine └── main.go ├── 12-channel ├── 01-unbuffer-buffer │ ├── main.go │ └── main_test.go └── 02-close-capsel-notification │ └── main.go ├── 13-select ├── 01-timeout │ └── main.go ├── 02-default │ └── main.go └── 03-continuous │ └── main.go ├── 14-mutex ├── 01-race │ └── main.go ├── 02-rwmutex │ └── main.go └── 03-atomic │ └── main.go ├── 15-context ├── 01-cancel-all │ └── main.go ├── 02-cascade │ └── main.go └── 03-deadline │ └── main.go ├── 16-errGroup ├── 01-manager │ └── main.go ├── 02-context │ └── main.go └── 03-timeout │ └── main.go ├── 17-pipeline └── main.go ├── 18-fanout-fanin └── main.go ├── 19-heartbeat └── main.go ├── README.md ├── go.mod ├── go.sum └── log.txt /.env.template: -------------------------------------------------------------------------------- 1 | GO_ENV=development -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .DS_Store -------------------------------------------------------------------------------- /00-module-package/calculator/multiply.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/00-module-package/calculator/multiply.go -------------------------------------------------------------------------------- /00-module-package/calculator/sum.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/00-module-package/calculator/sum.go -------------------------------------------------------------------------------- /00-module-package/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/00-module-package/main.go -------------------------------------------------------------------------------- /01-variables/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/01-variables/main.go -------------------------------------------------------------------------------- /02-slice-map/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/02-slice-map/main.go -------------------------------------------------------------------------------- /03-struct-receiver/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/03-struct-receiver/main.go -------------------------------------------------------------------------------- /04-closure/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/04-closure/main.go -------------------------------------------------------------------------------- /05-interface/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/05-interface/main.go -------------------------------------------------------------------------------- /06-control/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/06-control/main.go -------------------------------------------------------------------------------- /07-errors/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/07-errors/main.go -------------------------------------------------------------------------------- /08-generics/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/08-generics/main.go -------------------------------------------------------------------------------- /09-unit-test/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/09-unit-test/main.go -------------------------------------------------------------------------------- /09-unit-test/main_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/09-unit-test/main_test.go -------------------------------------------------------------------------------- /10-logger/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/10-logger/main.go -------------------------------------------------------------------------------- /11-goroutine/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/11-goroutine/main.go -------------------------------------------------------------------------------- /12-channel/01-unbuffer-buffer/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/12-channel/01-unbuffer-buffer/main.go -------------------------------------------------------------------------------- /12-channel/01-unbuffer-buffer/main_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/12-channel/01-unbuffer-buffer/main_test.go -------------------------------------------------------------------------------- /12-channel/02-close-capsel-notification/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/12-channel/02-close-capsel-notification/main.go -------------------------------------------------------------------------------- /13-select/01-timeout/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/13-select/01-timeout/main.go -------------------------------------------------------------------------------- /13-select/02-default/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/13-select/02-default/main.go -------------------------------------------------------------------------------- /13-select/03-continuous/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/13-select/03-continuous/main.go -------------------------------------------------------------------------------- /14-mutex/01-race/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/14-mutex/01-race/main.go -------------------------------------------------------------------------------- /14-mutex/02-rwmutex/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/14-mutex/02-rwmutex/main.go -------------------------------------------------------------------------------- /14-mutex/03-atomic/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/14-mutex/03-atomic/main.go -------------------------------------------------------------------------------- /15-context/01-cancel-all/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/15-context/01-cancel-all/main.go -------------------------------------------------------------------------------- /15-context/02-cascade/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/15-context/02-cascade/main.go -------------------------------------------------------------------------------- /15-context/03-deadline/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/15-context/03-deadline/main.go -------------------------------------------------------------------------------- /16-errGroup/01-manager/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/16-errGroup/01-manager/main.go -------------------------------------------------------------------------------- /16-errGroup/02-context/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/16-errGroup/02-context/main.go -------------------------------------------------------------------------------- /16-errGroup/03-timeout/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/16-errGroup/03-timeout/main.go -------------------------------------------------------------------------------- /17-pipeline/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/17-pipeline/main.go -------------------------------------------------------------------------------- /18-fanout-fanin/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/18-fanout-fanin/main.go -------------------------------------------------------------------------------- /19-heartbeat/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/19-heartbeat/main.go -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/README.md -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GomaGoma676/go-basics/HEAD/go.sum -------------------------------------------------------------------------------- /log.txt: -------------------------------------------------------------------------------- 1 | ERROR: 2023/03/08 16:43:58 doTask goroutine's heartbeat stopped 2 | --------------------------------------------------------------------------------