manifest

package
v0.0.0-...-4e8a72a Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// FreeBSDVersionCommand can be changed for unit test mocks
	FreeBSDVersionCommand = "/bin/freebsd-version"
)

Functions

This section is empty.

Types

type Manifest

type Manifest struct {
	Arch       string            `json:"arch"`
	Name       string            `json:"name"`
	Version    string            `json:"version"`
	Comment    string            `json:"comment"`
	Desc       string            `json:"desc"`
	Origin     string            `json:"origin"`
	Maintainer string            `json:"maintainer"`
	WWW        string            `json:"www"`
	Prefix     string            `json:"prefix"`
	Files      map[string]string `json:"files,omitempty"`
	Scripts    map[string]string `json:"scripts,omitempty"`
}

Manifest represents a +MANIFEST file

func FromFile

func FromFile(path string) (*Manifest, error)

FromFile reads a manifest from a file on disk

func (*Manifest) AddFilesFromDir

func (m *Manifest) AddFilesFromDir(path string) error

AddFilesFromDir adds files from a directory to the manifest data

func (*Manifest) Write

func (m *Manifest) Write(path string) error

Write writes a manifest to a file

func (*Manifest) WriteCompact

func (m *Manifest) WriteCompact(path string) error

WriteCompact outputs a compact manifest

Jump to

Keyboard shortcuts

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