github.com/anchore/syft@v1.4.2-0.20240516191711-1bec1fc5d397/syft/format/internal/spdxutil/helpers/none_if_empty.go (about)

     1  package helpers
     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  }