You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: user_errors.go
    path of file: ./repos/tania-core/backend/src/user/domain
    
    the code of the file until where you have to start completion: package domain

// UserError is a custom error from Go built-in error.
type UserError struct {
	Code int
}

const (
	UserEr
    
func (e UserError) Error() string {
	switch e.Code {
	case UserErrorUsernameEmptyCode:
		return "Username cannot be empty"
	case UserErrorInvalidUsernameLengthCode:
		return "Username is too short"
	case UserErrorPasswordEmptyCode:
		return "Password cannot be empty"
	case UserErrorWrongPasswordCode:
		return "Wrong password"
	case UserErrorUsernameExistsCode:
		return "Username already exists"
	case UserErrorPasswordConfirmationNotMatchCode:
		return "Password confirmation didn't match"
	case UserChangePasswordErrorWrongOldPasswordCode:
		return "Invalid old password"
	default:
		return "Unrecognized user error code"
	}
}