Skip to content

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

License

Notifications You must be signed in to change notification settings

Integralist/go-findroot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages