vcs

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

package vcs gets version control information from the file system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterVCS

func RegisterVCS(vcs Vcs)

RegisterVCS adds a new VCS to use.

Types

type Vcs

type Vcs interface {
	// Return nil VcsInfo if unable to determine VCS from directory.
	Find(dir string) (*VcsInfo, error)
}

Vcs represents a version control system.

type VcsBzr

type VcsBzr struct{}

func (VcsBzr) Find

func (VcsBzr) Find(dir string) (*VcsInfo, error)

type VcsGit

type VcsGit struct{}

func (VcsGit) Find

func (VcsGit) Find(dir string) (*VcsInfo, error)

type VcsHg

type VcsHg struct{}

func (VcsHg) Find

func (VcsHg) Find(dir string) (*VcsInfo, error)

type VcsInfo

type VcsInfo struct {
	Dirty        bool
	Revision     string
	RevisionTime *time.Time
}

VcsInfo returns information about a given repo.

func FindVcs

func FindVcs(root, packageDir string) (info *VcsInfo, err error)

FindVcs determines the version control information given a package dir and lowest root dir.

type VcsSvn

type VcsSvn struct{}

func (VcsSvn) Find

func (svn VcsSvn) Find(dir string) (*VcsInfo, error)

Jump to

Keyboard shortcuts

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