error-handling

command
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

README

Error Handling

This example demonstrates comprehensive error handling patterns.

What it shows

  • Creating iterators that can produce errors
  • Error propagation through transformations
  • Error handling in both sync and async operations
  • Graceful error handling patterns
  • Partial results before errors occur

Run

cd examples/error-handling
go run main.go

Key concepts

  • NewIteratorErr() creates iterators that can handle errors
  • Errors stop processing immediately
  • iter.Err() checks for errors after iteration
  • Both sync and async operations propagate errors correctly
  • You can get partial results before the error occurred

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL