Skip to content

Commit 609007d

Browse files
committed
use strings.Fields to split exception expressions
1 parent 364dd9a commit 609007d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spdxexp/satisfies.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func isAtomicLicense(testExpression string) bool {
238238
// negatives (e.g. " MIT " would not be considered a single license).
239239
func isLicenseWithException(testExpression string) (bool, string, string) {
240240
// split by " " and check if there are exactly 3 parts and the middle part is "WITH"
241-
parts := strings.Split(testExpression, " ")
241+
parts := strings.Fields(testExpression)
242242
if len(parts) == 3 && strings.EqualFold(parts[1], "WITH") {
243243
return true, parts[0], parts[2]
244244
}

0 commit comments

Comments
 (0)