internal/openapi/responder/serializer/errors.go   A
last analyzed

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
cc 1
eloc 9
dl 0
loc 15
ccs 1
cts 1
cp 1
crap 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A serializer.*UnsupportedFormatError.Error 0 2 1
1
package serializer
2
3
import (
4
	"errors"
5
	"fmt"
6
)
7
8
var ErrUnserializableData = errors.New("unserializable data")
9
10
type UnsupportedFormatError struct {
11
	Format string
12
}
13
14
func (err *UnsupportedFormatError) Error() string {
15 1
	return fmt.Sprintf("serialization format '%s' is not supported", err.Format)
16
}
17