gofindup

package module
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 3 Imported by: 2

README

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Findup

func Findup(name string) (string, error)

Recursively find a file by walking up parents in the file tree starting from the current working directory.

func FindupFrom

func FindupFrom(name, dir string) (string, error)

Recursively find a file by walking up parents in the file tree starting from a specific directory.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL