An open API service indexing awesome lists of open source software.

https://github.com/integralist/go-findroot

Locate the root directory of a project using Git via the command line
https://github.com/integralist/go-findroot

Last synced: over 1 year ago
JSON representation

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

Awesome Lists containing this project

README

          

go-findroot




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

## Example

```go
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
go test -v ./...
```

## Licence

[The MIT License (MIT)](http://opensource.org/licenses/MIT)

Copyright (c) 2016 [Mark McDonnell](http://twitter.com/integralist)