github.com/kastenhq/syft@v0.0.0-20230821225854-0710af25cdbe/syft/formats/common/spdxhelpers/none_if_empty.go (about) 1 package spdxhelpers 2 3 import ( 4 "strings" 5 ) 6 7 func NoneIfEmpty(value string) string { 8 if strings.TrimSpace(value) == "" { 9 return NONE 10 } 11 return value 12 }