grim/govcs

govcs

govcs is a simple abstraction layer around version control tools. It currently supports Git and Mercurial. With it you can get information about the repository including remotes, branches, commits, etc.

GoDoc

License

GPLv3

Installation

go get hg.sr.ht/~grim/govcs

Example

This simple example will output the default remote for the repository in the my-src-dir directory.

package main

import(
    "fmt"

    "hg.sr.ht/~grim/govcs"
)

func main() {
    vcs, err := govcs.Dectect("my-src-dir")
    if err != nil {
        panic(err)
    }

    fmt.Printf("remote: %s\n", vcs.Remote(""))
}
Recent Changes
Tags
Branches
Bookmarks