controlfile

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package controlfile contains functions for parsing Debian control files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDate

func FormatDate(date time.Time) string

func FormatYesNo

func FormatYesNo(v bool) string

func ParseDate

func ParseDate(str string) (time.Time, error)

func ParseYesNo

func ParseYesNo(str string) (bool, error)

func SkipSeparator

func SkipSeparator(data []byte) []byte

Types

type Field

type Field struct {
	// contains filtered or unexported fields
}

func (*Field) Is

func (f *Field) Is(name string) bool

func (*Field) Name

func (f *Field) Name() string

func (*Field) RawValue

func (f *Field) RawValue() []byte

func (*Field) SimpleValue

func (f *Field) SimpleValue() string

type Stanza

type Stanza []Field

func ParseStanza

func ParseStanza(data []byte) (Stanza, []byte)

func (*Stanza) Add

func (s *Stanza) Add(field Field)

func (*Stanza) AddRaw

func (s *Stanza) AddRaw(name string, value []byte)

func (*Stanza) AddSimple

func (s *Stanza) AddSimple(name, value string)

func (Stanza) Bytes

func (s Stanza) Bytes() []byte

func (Stanza) Get

func (s Stanza) Get(name string) *Field

func (Stanza) GetRaw

func (s Stanza) GetRaw(name string) []byte

func (Stanza) GetSimple

func (s Stanza) GetSimple(name string) string

func (Stanza) Marshal

func (s Stanza) Marshal(out io.Writer) error

func (*Stanza) SetSimple

func (s *Stanza) SetSimple(name, value string)

Jump to

Keyboard shortcuts

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