28 lines
482 B
Go
28 lines
482 B
Go
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),
|
|
)
|
|
}
|