Skip to content

Commit f359a6e

Browse files
committed
cpe: switch to new FS parser
Signed-off-by: Hank Donnay <hdonnay@redhat.com> Change-Id: I7d463973d062f4b352a3487372dadb036a6a6964
1 parent 585e6fc commit f359a6e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

toolkit/types/cpe/unbind.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ func Unbind(s string) (WFN, error) {
1818
case strings.HasPrefix(s, cpe22Prefix):
1919
return UnbindURI(s)
2020
case strings.HasPrefix(s, cpe23Prefix):
21-
return UnbindFS(s)
21+
var wfn WFN
22+
return wfn, wfn.UnmarshalFS(s)
2223
default:
2324
}
2425
return WFN{}, fmt.Errorf("cpe: string does not appear to be a bound WFN: %q", s)
@@ -154,6 +155,8 @@ var valueURI = strings.NewReplacer(
154155
)
155156

156157
// UnbindFS attempts to unbind a string as CPE 2.3 formatted string into a WFN.
158+
//
159+
// Deprecated: Use [WFN.UnmarshalFS].
157160
func UnbindFS(s string) (WFN, error) {
158161
wfn := WFN{}
159162
if !strings.HasPrefix(s, cpe23Prefix) {

0 commit comments

Comments
 (0)