Documentation ¶
Index ¶
Constants ¶
View Source
const ( PropertyType = "cran.type" PropertyPlatform = "cran.platform" PropertyRVersion = "cran.rvserion" TypeSource = "source" TypeBinary = "binary" )
Variables ¶
View Source
var ( ErrMissingDescriptionFile = util.NewInvalidArgumentErrorf("DESCRIPTION file is missing") ErrInvalidName = util.NewInvalidArgumentErrorf("package name is invalid") ErrInvalidVersion = util.NewInvalidArgumentErrorf("package version is invalid") )
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct { Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` ProjectURL []string `json:"project_url,omitempty"` License string `json:"license,omitempty"` Authors []string `json:"authors,omitempty"` Depends []string `json:"depends,omitempty"` Imports []string `json:"imports,omitempty"` Suggests []string `json:"suggests,omitempty"` LinkingTo []string `json:"linking_to,omitempty"` NeedsCompilation bool `json:"needs_compilation"` }
Metadata represents the metadata of a CRAN package
type Package ¶
Package represents a CRAN package
func ParseDescription ¶
ParseDescription parses a DESCRIPTION file to retrieve the metadata of a CRAN package
func ParsePackage ¶
func ParsePackage(r ReaderReaderAt, size int64) (*Package, error)
ParsePackage reads the package metadata from a CRAN package .zip and .tar.gz/.tgz files are supported.
Click to show internal directories.
Click to hide internal directories.