deb822

package module
v0.0.0-...-f5a04a8 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

README

deb822

deb822 is a Go library for parsing Debian-style RFC822, such as debian/control, debian/copyright, Sources, Packages, etc. Its functionality is similar to python-debian's deb822 module.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFormatFoldingOptions = FormatFoldingOptions{
	Multiline: true,
	Trailing:  true,
	Indent:    0,
	Sort:      true,
}

Functions

func FormatFolding

func FormatFolding(value []string, options FormatFoldingOptions) string

func ParseDebControl

func ParseDebControl(data string) (DebControl, []Stanza, error)

func SplitList

func SplitList(data string) []string

Types

type DebControl

type DebControl struct {
	Source   Source
	Packages []Package
}

type Description

type Description struct {
	Short string
	Long  string
}

type FormatFoldingOptions

type FormatFoldingOptions struct {
	Multiline bool
	Trailing  bool
	Indent    int
	Sort      bool
}

type Package

type Package struct {
	Package      string
	Architecture string
	Section      string
	Priority     string
	Essential    bool
	Depends      []string
	Recommends   []string
	Suggests     []string
	Enhances     []string
	PreDepends   []string
	Breaks       []string
	Conflicts    []string
	Description  Description
	Homepage     string
	BuiltUsing   []string
}

func ParsePackage

func ParsePackage(data string) (Package, error)

func ParsePackageStanza

func ParsePackageStanza(stanza Stanza) (Package, error)

type Source

type Source struct {
	Source              string
	Maintainer          mail.Address
	Uploaders           []mail.Address
	Section             string
	Priority            string
	BuildDepends        []string
	BuildDependsIndep   []string
	BuildDependsArch    []string
	BuildConflicts      []string
	BuildConflictsIndep []string
	BuildConflictsArch  []string
	StandardsVersion    string
	Homepage            string
	VcsBrowser          string
	VcsGit              VcsGit
	Testsuite           []string
	RulesRequiresRoot   string
}

func ParseSource

func ParseSource(data string) (Source, error)

func ParseSourceStanza

func ParseSourceStanza(stanza Stanza) (Source, error)

type Stanza

type Stanza = map[string]string

func Parse

func Parse(data string) ([]Stanza, error)

func ParseStanza

func ParseStanza(data string) (Stanza, error)

type SyntaxError

type SyntaxError struct {
	Line int
	Col  int
	// contains filtered or unexported fields
}

func (*SyntaxError) Error

func (e *SyntaxError) Error() string

type VcsGit

type VcsGit struct {
	Url    string
	Branch string
	Path   string
}

func ParseVcsGit

func ParseVcsGit(line string) (VcsGit, error)

Jump to

Keyboard shortcuts

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