akito0107/generr

View on GitHub
e2e/emailNotFound_impl.go

Summary

Maintainability
A
1 hr
Test Coverage
// Code generated by "generr"; DO NOT EDIT.
package e2e

import "fmt"

func IsEmailNotFound(err error) (bool, string) {
    var email string
    if e, ok := err.(emailNotFound); ok {
        email = e.EmailNotFound()
        return true, email
    }
    return false, email
}

type EmailNotFound struct {
    Email string
}

func (e *EmailNotFound) EmailNotFound() string {
    return e.Email
}
func (e *EmailNotFound) Error() string {
    return fmt.Sprintf("email %s is not found", e.Email)
}