cliutil

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2019 License: MIT Imports: 3 Imported by: 4

README

go-cliutil

GoDoc Build Status codecov Go Report Card GitHub last commit GitHub tag License

golang CLI's utilities

Motivation

I have developed some CLI tools with Go, and found that some logics are common among them. I have separated common logics as library.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvErrToExitError

func ConvErrToExitError(err error) error

ConvErrToExitError converts an error into urfave/cli's ExitError.

func FindFile

func FindFile(wd string, existFile ExistFile, names ...string) (string, error)

FindFile finds file from wd to the root directory recursively.

func WrapAction

func WrapAction(f func(c *cli.Context) error) func(c *cli.Context) error

Types

type ExistFile

type ExistFile func(string) bool

ExistFile returns true if file exists otherwise false.

Jump to

Keyboard shortcuts

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