Files
utils/wrappers/errors.go
zeekay 6e664f1f74 feat: add wrappers and bimap packages
Add wrappers package with Packer, Errs, and Closer types for
binary serialization and error handling. These are needed by
other Lux packages that were previously importing from vm.

Add bimap package for bidirectional maps.

Update atomic.go to re-export from standalone atomic module.
2026-01-26 08:24:41 -08:00

22 lines
383 B
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package wrappers
type Errs struct{ Err error }
func (errs *Errs) Errored() bool {
return errs.Err != nil
}
func (errs *Errs) Add(errors ...error) {
if errs.Err == nil {
for _, err := range errors {
if err != nil {
errs.Err = err
break
}
}
}
}