aboutsummaryrefslogtreecommitdiff
path: root/internal/cvss/badkey.go
blob: 50780745b3645e3d25c619155d6dfccf73568a76 (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 key error.
type badKey struct {
  version Version
  key string
}

// Create new bad key error.
func newBadKey(version Version, key string) error {
  return &badKey { version, key }
}

// Return printable error string
func (e badKey) Error() string {
  return fmt.Sprintf("invalid CVSS %s metric key: %s", e.version, e.key)
}