chore: initialize containerized Go learning workbook (2026 DevOps/SRE)
This commit is contained in:
commit
84be3e5d77
64 files changed
+1382
No files matched your search
@@ -0,0 +1,12 @@
|
||||
# 01 — Podstawy Go (`:=`, `if`, `switch`, `for`, multiple return values)
|
||||
|
||||
## Zadania (`basics.go`)
|
||||
1. `CelsiusToFahrenheit(c float64) float64` — $F = C \cdot 1.8 + 32$.
|
||||
2. `ClassifyScore(score int) string` — `switch` bez warunku: `0..49` -> `"fail"`, `50..74` -> `"pass"`, `75..89` -> `"good"`, `90..100` -> `"excellent"`, inaczej `"invalid"`.
|
||||
3. `SumUpTo(n int) int` — suma `1..n` włącznie (dla `<= 0` zwróć `0`).
|
||||
4. `DivMod(a, b int) (int, int, bool)` — zwróć `(iloraz, reszta, true)` lub `(0, 0, false)` przy `b == 0`.
|
||||
|
||||
## Uruchomienie testów
|
||||
```bash
|
||||
make test PKG=./exercises/01-core/01-basics
|
||||
```
|
||||
Reference in new issue
Block a user