generator.go
Function appendErrorImplementation
has 125 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func appendErrorImplementation(ts *ast.TypeSpec, typename, mes string) ([]ast.Decl, error) {
it, ok := ts.Type.(*ast.InterfaceType)
if !ok {
return nil, errors.Errorf("type %+v is not a interface", ts.Type)
}
Function appendCheckFunction
has 124 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func appendCheckFunction(ts *ast.TypeSpec, withCause bool) ([]ast.Decl, error) {
it, ok := ts.Type.(*ast.InterfaceType)
if !ok {
return nil, errors.Errorf("type %+v is not a interface", ts.Type)
}
Method Generator.Out
has 5 return statements (exceeds 4 allowed). Open
Open
func (g *Generator) Out(w io.Writer) error {
var buf bytes.Buffer
if _, err := fmt.Fprintf(&buf, "// Code generated by \"generr\"; DO NOT EDIT.\n"); err != nil {
return err
}