LabscoMCP early access ↗

Borrows from Rust and Scala the idea of a value that might be absent, or a result that might have failed, and gives Go a type for it — so the compiler makes you handle the empty case.

WHEN TO USE

SCOPE

USE FOR

  • Replace a nil pointer check with a type-safe Option marking a value present or absent.
  • Wrap Go's (value, error) pattern in a Result and chain transforms that skip on failure.
  • Model an outcome that can be one of two valid types, like cached versus fresh data.
  • Store a nullable database column or optional JSON field as a self-scanning Option.
  • Write straight-line code with mo.Do and let it turn a MustGet panic into a Result error.

NOT FOR

  • Nil-safety and zero-value design that does not use this library.
  • Native error wrapping with fmt.Errorf, errors.Is, and errors.As.