package convert

import "github.com/spdx/tools-golang/convert"

Index

Variables

var DocumentChain = converter.NewChain(
	v2_1.Document{},
	v2_2.Document{},
	v2_3.Document{},
)

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

chain.go struct.go

Version
v0.5.5 (latest)
Published
Jun 17, 2024
Platform
linux/amd64
Imports
7 packages
Last checked
3 weeks ago

Tools for package owners.