15 lines
237 B
Go
15 lines
237 B
Go
package config
|
|
|
|
import "fmt"
|
|
|
|
const pkgName = "config"
|
|
|
|
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)
|
|
}
|