github.com/nextlinux/gosbom@v0.81.1-0.20230627115839-1ff50c281391/gosbom/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 }