github.com/lineaje-labs/syft@v0.98.1-0.20231227153149-9e393f60ff1b/syft/format/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 }