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,25 @@
|
||||
package pointers
|
||||
|
||||
type BankAccount struct {
|
||||
balance int
|
||||
}
|
||||
|
||||
func NewBankAccount(initial int) *BankAccount {
|
||||
panic("TODO: zwróć &BankAccount{balance: initial}")
|
||||
}
|
||||
|
||||
func (a *BankAccount) Deposit(amount int) {
|
||||
panic("TODO: dodaj amount jeśli > 0")
|
||||
}
|
||||
|
||||
func (a *BankAccount) Withdraw(amount int) bool {
|
||||
panic("TODO: wypłać jeśli amount > 0 && a.balance >= amount")
|
||||
}
|
||||
|
||||
func (a *BankAccount) Balance() int {
|
||||
return a.balance
|
||||
}
|
||||
|
||||
func IncrementAll(nums []int, delta int) {
|
||||
panic("TODO: zwiększ każdy element nums o delta w miejscu")
|
||||
}
|
||||
Reference in new issue
Block a user