Skip to content

Find up utility implemented in Go

License

Notifications You must be signed in to change notification settings

ojizero/gofindup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Find Up

GoDoc Run tests

Find a file or directory by walking up parent directories.

Usage

Install latest version

go get github.com/ojizero/gofindup

Import it into your code

import "github.com/ojizero/gofindup"

This package only exposes 2 functions, Findup and FindupFrom,

// looks the file recursively in parents starting from "./"
gofindup.Findup("some-file-or-directory")

// looks the file recursively in parents starting from "./some-starting-directory"
gofindup.FindupFrom("some-file-or-directory", "some-starting-directory")