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 01c9ea7079 update env var used goreleaser hace 7 meses
.github/workflows update env var used goreleaser hace 7 meses
cmd add goreleaser package hace 7 meses
.gitignore add goreleaser package hace 7 meses
.goreleaser.yml add goreleaser package hace 7 meses
LICENSE Initial release hace 11 meses
README.md added tests badge hace 7 meses
findup.go correctly return error if it's from Getwd hace 10 meses
findup_test.go fixed API making it reasonable :D hace 11 meses
go.mod add basic CLI for package hace 7 meses
go.sum add basic CLI for package hace 7 meses

README.md

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