spdx / tools-golang

Collection of Go packages to work with SPDX files
Other
116 stars 54 forks source link

refactor(verification): don't create empty `ExcludedFiles` array #230

Closed DmitriyLewen closed 7 months ago

DmitriyLewen commented 7 months ago

Description

excludeFile for GetVerificationCode function is optional field. We can avoid creating an empty array forExcludedFiles if excludeFile is empty.

Before:

      "packageVerificationCode": {
        "packageVerificationCodeValue": "a30b237d03b2e0ae8df0801c0bc0f519d2cac6c0",
        "packageVerificationCodeExcludedFiles": [
          ""
        ]
      },

After:

      "packageVerificationCode": {
        "packageVerificationCodeValue": "a30b237d03b2e0ae8df0801c0bc0f519d2cac6c0"
      },