blob: 8f0bf5fcce3a7bbb42ec5d6c17fcb93c2811f36a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package cvss
import "fmt"
// Bad metric error.
type badMetric struct {
version Version // CVSS version
val string // metric value
}
// Create new bad key error.
func newBadMetric(version Version, val string) error {
return &badMetric { version, val }
}
// Return printable error string.
func (e badMetric) Error() string {
return fmt.Sprintf("invalid CVSS %s metric: %s", e.version, e.val)
}
|