1
0
mirror of https://github.com/kataras/iris.git synced 2026-03-09 18:05:57 +00:00

formatting

Former-commit-id: 037081db5d6d4434e873ca8b75334ee43e046b6a
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-08-17 10:06:20 +03:00
parent 00967408dc
commit 07046ab978
112 changed files with 477 additions and 517 deletions

View File

@@ -8,10 +8,8 @@ import (
"github.com/iris-contrib/go.uuid"
)
var (
// Prefix the error prefix, applies to each error's message.
Prefix = ""
)
// Prefix the error prefix, applies to each error's message.
var Prefix = ""
// Error holds the error message, this message never really changes
type Error struct {

View File

@@ -14,7 +14,6 @@ var userMail = "user1@mail.go"
var expectedUserAlreadyExists = "User with mail: user1@mail.go already exists"
func ExampleError() {
fmt.Print(errUserAlreadyExists.Format(userMail).Append("Please change your mail addr"))
// Output:
@@ -38,7 +37,6 @@ func TestFormat(t *testing.T) {
}
func TestAppendErr(t *testing.T) {
errChangeMailMsg := "Please change your mail addr"
errChangeMail := fmt.Errorf(errChangeMailMsg) // test go standard error
errAppended := errUserAlreadyExists.AppendErr(errChangeMail)

View File

@@ -78,7 +78,6 @@ func (r *Reporter) AddErr(err error) bool {
//
// Returns true if this "err" is not nil and it's added to the reporter's stack.
func (r *Reporter) Add(format string, a ...interface{}) bool {
if format == "" && len(a) == 0 {
return false
}