Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
ojizero 01c9ea7079 update env var used goreleaser 1 år sedan
.github/workflows update env var used goreleaser 1 år sedan
cmd add goreleaser package 1 år sedan
.gitignore add goreleaser package 1 år sedan
.goreleaser.yml add goreleaser package 1 år sedan
LICENSE Initial release 2 år sedan
README.md added tests badge 1 år sedan
findup.go correctly return error if it's from Getwd 2 år sedan
findup_test.go fixed API making it reasonable :D 2 år sedan
go.mod add basic CLI for package 1 år sedan
go.sum add basic CLI for package 1 år sedan

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