Skip to content

Commit 0600a7e

Browse files
committed
Using error message as to string
Signed-off-by: Vishal Rana <[email protected]>
1 parent 844f19f commit 0600a7e

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

email.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package labstack
22

33
import (
4-
"fmt"
5-
64
"encoding/base64"
75
"io/ioutil"
86
"path/filepath"
@@ -108,5 +106,5 @@ func (e *Email) Send(m *EmailMessage) (*EmailMessage, error) {
108106
}
109107

110108
func (e *EmailError) Error() string {
111-
return fmt.Sprintf("email error, code=%d, message=%s", e.Code, e.Message)
109+
return e.Message
112110
}

log.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,5 @@ func (l *Log) Log(level Level, format string, args ...interface{}) {
171171
}
172172

173173
func (e *LogError) Error() string {
174-
return fmt.Sprintf("log error, code=%d, message=%s", e.Code, e.Message)
174+
return e.Message
175175
}

store.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package labstack
22

33
import (
4-
"fmt"
54
"time"
65

76
"github.com/dghubble/sling"
@@ -116,5 +115,5 @@ func (s *Store) Delete(key string) error {
116115
}
117116

118117
func (e *StoreError) Error() string {
119-
return fmt.Sprintf("store error, code=%d, message=%s", e.Code, e.Message)
118+
return e.Message
120119
}

0 commit comments

Comments
 (0)