gut

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package gut (git utils) implements some Helper Functions around the `git` Library to easier interact with the Repository.

Deprecated: The gut package is marked as deprecated since we will drop the git dependency in the future.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindGitRoot deprecated

func FindGitRoot(base string) (string, error)

FindGitRoot returns the last found `.git` Directory from the base Means if your are in $PATH/cmd/test and the Git Root is $PATH/ FuncGitRoot will return $PATH/ It will return an Error if the `.git/` Directory could not be found.

Deprecated: The gut package is marked as deprecated since we will drop the git dependency in the future.

func GetAuthorName deprecated

func GetAuthorName() (string, error)

GetAuthorName returns the author name configured in the git config

Deprecated: The gut package is marked as deprecated since we will drop the git dependency in the future.

func GetCurrentBranchFromRepository deprecated

func GetCurrentBranchFromRepository(repository *git.Repository) (string, error)

GetCurrentBranchFromRepository does return the current checked out branch from the repository.

Deprecated: The gut package is marked as deprecated since we will drop the git dependency in the future.

Types

This section is empty.

Jump to

Keyboard shortcuts

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