package convert
import "github.com/spdx/tools-golang/convert"
Index ¶
- Variables
- func Describe(o interface{}) string
- func Document(from common.AnyDocument, to common.AnyDocument) error
- func FromPtr(doc common.AnyDocument) common.AnyDocument
- func IsPtr(obj common.AnyDocument) bool
Variables ¶
Functions ¶
func Describe ¶
func Describe(o interface{}) string
func Document ¶
func Document(from common.AnyDocument, to common.AnyDocument) error
Document converts from one document to another document For example, converting a document to the latest version could be done like:
sourceDoc := // e.g. a v2_2.Document from somewhere var targetDoc spdx.Document // this can be any document version err := convert.Document(sourceDoc, &targetDoc) // the target must be passed as a pointer
func FromPtr ¶
func FromPtr(doc common.AnyDocument) common.AnyDocument
FromPtr accepts a document or a document pointer and returns the direct struct reference
func IsPtr ¶
func IsPtr(obj common.AnyDocument) bool
Source Files ¶
- Version
- v0.5.5 (latest)
- Published
- Jun 17, 2024
- Platform
- js/wasm
- Imports
- 7 packages
- Last checked
- 3 weeks ago –
Tools for package owners.