Help us shape the future of Go! Take the 2026 Go Developer Survey

cran

package
v3.1.61 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT, MIT Imports: 9 Imported by: 0

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
}

Source Files

  • metadata.go

Jump to

Keyboard shortcuts

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