Test Failed
Push — master ( d4cdd3...569253 )
by Vyacheslav
03:17 queued 01:50
created

goagi.*Error.Error   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
package goagi
2
3
import "fmt"
4
5
type Error struct {
0 ignored issues
show
introduced by
exported type Error should have comment or be unexported
Loading history...
6
	s string
7
	e string
8
}
9
10
func newError(ctx string) *Error {
11
	return &Error{s: ctx}
12
}
13
14
func (e *Error) Msg(msg string, args ...interface{}) error {
0 ignored issues
show
introduced by
exported method Error.Msg should have comment or be unexported
Loading history...
15
	e.e = fmt.Sprintf(msg, args...)
0 ignored issues
show
introduced by
can't check non-constant format in call to Sprintf
Loading history...
16
	return e
17
}
18
19
func (e *Error) Error() string {
20
	return fmt.Sprintf("%s: %s", e.s, e.e)
21
}
22