diff options
author | pxp928 <parth.psu@gmail.com> | 2022-09-28 09:05:05 -0400 |
---|---|---|
committer | pxp928 <parth.psu@gmail.com> | 2022-09-28 09:05:05 -0400 |
commit | 9b78ab0ad01e4469df9e7106b169237e8f2650f5 (patch) | |
tree | 072c85fa4e94bc4007dcf1fc125b060e8cffe946 /spdx | |
parent | 9c474845899d0fc801c3fd45d5c8980a6cd9e984 (diff) | |
download | spdx-tools-9b78ab0ad01e4469df9e7106b169237e8f2650f5.tar.gz |
changed to string type based on comment
Signed-off-by: pxp928 <parth.psu@gmail.com>
Diffstat (limited to 'spdx')
-rw-r--r-- | spdx/common/ext_package_manager.go | 13 | ||||
-rw-r--r-- | spdx/common/external.go | 9 | ||||
-rw-r--r-- | spdx/v2_1/package.go | 2 |
3 files changed, 10 insertions, 14 deletions
diff --git a/spdx/common/ext_package_manager.go b/spdx/common/ext_package_manager.go deleted file mode 100644 index 6e769ce..0000000 --- a/spdx/common/ext_package_manager.go +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later - -package common - -// ReferenceType is an [idstring] as defined in Appendix VI; -type ReferenceType string - -// *Type is the enumerable of ReferenceType -const ( - Cpe23Type ReferenceType = "cpe23Type" - PurlType ReferenceType = "purl" - Ref2Type ReferenceType = "LocationRef-acmeforge" -) diff --git a/spdx/common/external.go b/spdx/common/external.go new file mode 100644 index 0000000..b4d84a2 --- /dev/null +++ b/spdx/common/external.go @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +package common + +// *Type is the enumerable of ReferenceType +const ( + Cpe23Type string = "cpe23Type" + PurlType string = "purl" +) diff --git a/spdx/v2_1/package.go b/spdx/v2_1/package.go index 3abc831..4bf5636 100644 --- a/spdx/v2_1/package.go +++ b/spdx/v2_1/package.go @@ -108,7 +108,7 @@ type PackageExternalReference struct { // type is an [idstring] as defined in Appendix VI; // called RefType here due to "type" being a Golang keyword - RefType common.ReferenceType `json:"referenceType"` + RefType string `json:"referenceType"` // locator is a unique string to access the package-specific // info, metadata or content within the target location |