source

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ParserTypeGit is the type of parser for git repositories.
	ParserTypeGit = "git"

	// ParserTypeZeta is the type of parser for zeta repositories.
	ParserTypeZeta = "zeta"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	// URL is the URL of the source.
	// e.g git is the origin remote URL.
	URL string
	// Commit is the commit hash of the source.
	// e.g git is the HEAD commit hash.
	Commit string
	// Dirty is true if the source is dirty.
	// e.g git is indicating whether the workspace is dirty.
	Dirty bool
}

Info is a struct that holds the source information.

type Parser

type Parser interface {
	Parse(workspace string) (*Info, error)
}

Parser is an interface for parsing the source information.

func NewParser

func NewParser(typ string) (Parser, error)

Jump to

Keyboard shortcuts

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