func exists(path string) (bool, error) {
	if path == "" {
		return false, nil
	}

	_, err := os.Stat(path)
	if err == nil {
		return true, nil
	}
	if !os.IsNotExist(err) {
		return false, err
	}

	return false, nil
}
// This function from github.com/spf13/cobra used under Apache 2.0 license
This function from github.com/spf13/cobra used under Apache 2.0 license
// This function from github . com / spf13 / cobra used under Apache 2 . 0 license
func exists(path string) (bool, error) {
	if path == "" {
		return false, nil
	}
	_, err := os.Stat(path)
	if err == nil {
		return true, nil
	}
	if !os.IsNotExist(err) {
		return false, err
	}
	return false, nil
}
func exists ( path string ) ( bool , error ) { if path == " " { return false , nil } _ , err := os . Stat ( path ) if err == nil { return true , nil } if ! os . IsNotExist ( err ) { return false , err } return false , nil }
This function from github.com/spf13/cobra used under Apache 2.0 license
This function from github . com / spf13 / cobra used under Apache 2 . 0 license