source

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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