rum-goggles/v1/internal/events/error.go

15 lines
237 B
Go
Raw Normal View History

package events
2024-04-04 14:46:14 +00:00
import "fmt"
const pkgName = "events"
2024-04-04 14:46:14 +00:00
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)
}