You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ojizero 5f98ec040a add goreleaser package 5 months ago
.github/workflows corrected anem of release job 9 months ago
cmd add goreleaser package 5 months ago
.gitignore add goreleaser package 5 months ago
.goreleaser.yml add goreleaser package 5 months ago
LICENSE Initial release 9 months ago
README.md Update README.md 8 months ago
findup.go correctly return error if it's from Getwd 9 months ago
findup_test.go fixed API making it reasonable :D 9 months ago
go.mod add basic CLI for package 5 months ago
go.sum add basic CLI for package 5 months ago

README.md

Go Find Up

Find a file or directory by walking up parent directories.

Usage

GoDoc

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")