cran

package
v1.22.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 9 Imported by: 3

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

type Package struct {
	Name          string
	Version       string
	FileExtension string
	Metadata      *Metadata
}

Package represents a CRAN package

func ParseDescription

func ParseDescription(r io.Reader) (*Package, error)

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.

type ReaderReaderAt

type ReaderReaderAt interface {
	io.Reader
	io.ReaderAt
}

Jump to

Keyboard shortcuts

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