feat!: update contract for 'Table.Get()'
All checks were successful
CI / Check PR Title (pull_request) Successful in 19s
CI / Go Lint (pull_request) Successful in 42s
CI / Markdown Lint (pull_request) Successful in 22s
CI / Makefile Lint (pull_request) Successful in 40s
CI / Unit Tests (pull_request) Successful in 37s
CI / Fuzz Tests (pull_request) Successful in 1m12s
CI / Mutation Tests (pull_request) Successful in 1m18s

This commit is contained in:
2026-04-03 21:27:48 +02:00
parent 322d71f0be
commit 95687acade
4 changed files with 19 additions and 20 deletions

View File

@@ -14,19 +14,19 @@ func Example_basic() {
fmt.Println("Put error:", err)
}
if item, err := table.Get(1); err != nil {
fmt.Println("Error:", err)
if item, ok := table.Get(1); !ok {
fmt.Println("Not Found 1!")
} else {
fmt.Println("Found 1:", item)
}
if item, err := table.Get(0); err != nil {
fmt.Println("Error:", err)
if item, ok := table.Get(0); !ok {
fmt.Println("Not Found 0!")
} else {
fmt.Println("Found 0:", item)
}
// Output:
// Found 1: Hello, World!
// Error: key '0' not found
// Not Found 0!
}