rumble-lib-go/error.go

15 lines
237 B
Go
Raw Normal View History

2024-05-23 22:07:45 +00:00
package rumble
import "fmt"
const pkgName = "rumble"
func pkgErr(prefix string, err error) error {
pkgErr := pkgName
if prefix != "" {
pkgErr = fmt.Sprintf("%s: %s", pkgErr, prefix)
}
return fmt.Errorf("%s: %v", pkgErr, err)
}