blob: e7c3f4ccf01ca185634a404231acf7510882cfb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// CVSS vector parser.
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)
}
|