vcs

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Catalog []*Item

Catalog is the list of registered vcs's.

Functions

func Register

func Register(name string, priority int, newfn NewFnSig)

Register a new VCS.

Types

type Item

type Item struct {
	Name     string
	New      NewFnSig
	Priority int
}

Item stores one item

type NewFnSig

type NewFnSig func() (Vcs, error)

NewFnSig function signature needed by reg.

type Vcs

type Vcs interface {
	models.Vcs
}

Vcs is the handle

func Discover

func Discover() (Vcs, string)

Discover polls the VCS plug-ins to determine the VCS of directory. The first to succeed is returned. It never returns nil, since "NONE" is always valid.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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