gitmeta

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package gitmeta provides Git metadata for headercheck.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
	// contains filtered or unexported fields
}

Git is a Git metadata provider.

func Disabled

func Disabled() *Git

Disabled returns a Git instance that is disabled.

func New

func New(ctx context.Context, root string) (*Git, error)

New creates a new Git instance.

func (*Git) Author

func (g *Git) Author(path string) (string, error)

Author returns the author of the file.

func (*Git) CreationDate

func (g *Git) CreationDate(path string) (string, error)

CreationDate returns the creation date of the file.

func (*Git) LastUpdateDate

func (g *Git) LastUpdateDate(path string) (string, error)

LastUpdateDate returns the last update date of the file.

func (*Git) Touched

func (g *Git) Touched(ctx context.Context, path string) (bool, error)

Touched reports if file has changes compared to HEAD (or if newly added/unstaged).

Jump to

Keyboard shortcuts

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