repogen/internal/code/errors.go

29 lines
482 B
Go
Raw Permalink Normal View History

package code
import (
"errors"
"fmt"
)
var (
ErrAmbiguousPackageName = errors.New("code: ambiguous package name")
)
type DuplicateStructError string
func (err DuplicateStructError) Error() string {
return fmt.Sprintf(
"code: duplicate implementation of struct '%s'",
string(err),
)
}
type DuplicateInterfaceError string
func (err DuplicateInterfaceError) Error() string {
return fmt.Sprintf(
"code: duplicate implementation of interface '%s'",
string(err),
)
}