vcs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
	Commit         GitCommit `cty:"commit"`
	Branch         string    `cty:"branch"`
	Tag            string    `cty:"tag"`
	Reference      string    `cty:"reference"`
	StagedFiles    []string  `cty:"staged_files"`
	UnstagedFiles  []string  `cty:"unstaged_files"`
	ModifiedFiles  []string  `cty:"modified_files"`
	UntrackedFiles []string  `cty:"untracked_files"`
	Dirty          bool      `cty:"dirty"`
}

func ParseGitInfo

func ParseGitInfo(root string) (*Git, error)

type GitCommit

type GitCommit struct {
	Hash    string          `cty:"commit_hash"`
	Author  GitCommitAuthor `cty:"author"`
	Message string          `cty:"message"`
}

type GitCommitAuthor

type GitCommitAuthor struct {
	Name  string `cty:"name"`
	Email string `cty:"email"`
}

type Type

type Type string
const (
	TypeGit Type = "git"
)

func ParseType

func ParseType(s string) (Type, error)

func (*Type) Directory

func (t *Type) Directory() string

func (*Type) Set

func (t *Type) Set(s string) error

func (*Type) String

func (t *Type) String() string

func (*Type) Type

func (t *Type) Type() string

func (*Type) UnmarshalText

func (t *Type) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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