imports

package
v0.0.0-...-ed8d817 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectRootPackageNames

func CollectRootPackageNames(dir string) []string

CollectRootPackageNames collects the root package names of imports.

func GetRepoStates

func GetRepoStates(dir string) []*repo.State

GetRepoStates returns the repo states for each import found in the directory.

Types

type DepInfo

type DepInfo struct {
	Import     string
	Dependency *repo.Dependency
	State      DepState
}

DepInfo holds the dependency info for a one import.

type DepInfos

type DepInfos []*DepInfo

DepInfos holds multiple DepInfo records and provides convenient sorting.

func GetDepInfo

func GetDepInfo(cfg *repo.Config) DepInfos

GetDepInfo returns the dependency information.

func (DepInfos) Len

func (di DepInfos) Len() int

func (DepInfos) Less

func (di DepInfos) Less(i, j int) bool

func (DepInfos) Swap

func (di DepInfos) Swap(i, j int)

type DepState

type DepState int

DepState holds the state of the dependency

const (
	MissingConfig DepState = iota
	MissingOnDisk
	MissingOnDiskAndConfig
	NotNeeded
	IncorrectVersion
	Dirty
	Good
)

The possible DepStates

func GetDepState

func GetDepState(dep *repo.Dependency, state *repo.State) DepState

GetDepState returns the dependency status for a dependency.

func (DepState) MarkerAndDescription

func (ds DepState) MarkerAndDescription() (rune, string)

MarkerAndDescription returns the single-character marker and description for a DepState.

Jump to

Keyboard shortcuts

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