lib

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(dataArray []byte) string

Normalize normalizes given string (remove return code, tab, and adjacent spaces)

Types

type LicenseMeta

type LicenseMeta struct {
	Names       *Names   `json:"name"`
	OsiApproved bool     `json:"osi-approved"`
	Deprecated  bool     `json:"deprecated"`
	Urls        []string `json:"urls"`
}

LicenseMeta shows meta information of license of SPDX.

func ReadSPDX

func ReadSPDX(path string) (*LicenseMeta, string, error)

ReadSPDX reads license data from SPDX xml file and returns meta information of license and lisense terms.

func (*LicenseMeta) String

func (lm *LicenseMeta) String() string

type Names

type Names struct {
	ShortName string `json:"short"`
	FullName  string `json:"full"`
}

Names shows names of license (short and full name)

Jump to

Keyboard shortcuts

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