您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
ojizero 1ec2869b66 Initial release 10 个月前
.github/workflows Initial release 10 个月前
.gitignore Initial release 10 个月前
LICENSE Initial release 10 个月前
README.md Initial release 10 个月前
findup.go Initial release 10 个月前
findup_test.go Initial release 10 个月前
go.mod Initial release 10 个月前
go.sum Initial release 10 个月前

README.md

Go Find Up

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.Findup("some-file-or-directory", "some-starting-directory")