rum-goggles/v1/internal/chatbot/error.go
2024-05-22 12:51:46 -04:00

15 lines
239 B
Go

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