versioning

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatOscalVersion

func FormatOscalVersion(version string) (formattedVersion string)

FormatOscalVersion takes a version string and returns a formatted version string

func GetLatestSupportedVersion

func GetLatestSupportedVersion() string

GetLatestSupportedVersion returns the latest version of the OSCAL schema supported by the go-oscal release

func GetOscalVersionFromMap

func GetOscalVersionFromMap(model map[string]interface{}) (version string, err error)

GetOscalVersionFromMap returns formatted OSCAL version if valid version is passed, returns error if not.

func GetTimestamp

func GetTimestamp() time.Time

GetTimestamp returns the current time

func IsValidOscalVersion

func IsValidOscalVersion(version string) error

IsValidOscalVersion returns true if the version is supported, false if not.

func ReplaceOscalVersionInMap

func ReplaceOscalVersionInMap(model map[string]interface{}, version string) (upgradedModel map[string]interface{}, err error)

ReplaceOscalVersionInMap returns the model with the oscal version replaced

func UpdateLastModified

func UpdateLastModified(metadata map[string]interface{})

UpdateLastModified updates the last-modified field in the metadata

func VersionWarning

func VersionWarning(version string) error

VersionWarning returns an warning as an error if there are any known issues with the current version or it isn't the latest.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL