conf

package
v0.0.0-...-76ca9eb Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Package   string            `yaml:"package,omitempty"`
	Imports   []Import          `yaml:"import,omitempty"`
	Excludes  []string          `yaml:"exclude,omitempty"`
	Packages  []string          `yaml:"packages,omitempty"`
	ImportMap map[string]Import `yaml:"-"`
	// contains filtered or unexported fields
}

func Parse

func Parse(path string) (*Conf, error)

func (*Conf) ConfFile

func (t *Conf) ConfFile() string

func (*Conf) Dedupe

func (t *Conf) Dedupe()

Dedupe deletes duplicates and sorts the imports

func (*Conf) Dump

func (t *Conf) Dump(path string) error

func (*Conf) Get

func (t *Conf) Get(pkg string) (Import, bool)

type ExportMap

type ExportMap struct {
	Imports map[string]Import `yaml:"imports,omitempty"`
}

type Import

type Import struct {
	Package string `yaml:"package,omitempty"`
	Version string `yaml:"version,omitempty"`
	Repo    string `yaml:"repo,omitempty"`
	Update  bool   `yaml:"-"`
	Options `yaml:",inline"`
}

type Imports

type Imports []Import

func (Imports) Len

func (i Imports) Len() int

func (Imports) Less

func (i Imports) Less(k, j int) bool

func (Imports) Swap

func (i Imports) Swap(k, j int)

type Options

type Options struct {
	Transitive bool `yaml:"transitive,omitempty"`
	Staging    bool `yaml:"staging,omitempty"`
}

Jump to

Keyboard shortcuts

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