go-findroot

module
v0.0.0-...-ac90681 Latest Latest
Warning

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

Go to latest
Published: May 18, 2016 License: MIT

README

go-findroot

Locate the root directory of a project using Git via the command line

Example

package main

import (
	"fmt"
	"log"

	"github.com/integralist/go-findroot/find"
)

func main() {
  root, err := find.Repo()
  if err != nil {
    log.Fatalf("Error: %s", err.Error())
  }

  fmt.Printf("%+v", root)
  // {Name:go-findroot Path:/Users/M/Projects/golang/src/github.com/integralist/go-findroot}
}

Tests

go test -v ./...

Licence

The MIT License (MIT)

Copyright (c) 2016 Mark McDonnell

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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