rum-goggles/v1/internal/api/error.go
2024-04-04 10:46:14 -04:00

15 lines
231 B
Go

package api
import "fmt"
const pkgName = "api"
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)
}