tools

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package tools contains common tools used throughout this application.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Files

func Files(recursive bool, paths ...string) ([]string, error)

Files returns all files found in paths. If recursive is false, it only returns the immediate files in the paths.

Example
package main

import (
	"github.com/arsham/blush/internal/tools"
)

func main() {
	tools.Files(true, "~/Documents", "/tmp")
	// Or
	dirs := []string{"~/Documents", "/tmp"}
	tools.Files(false, dirs...)
}
Output:

func IsPlainText

func IsPlainText(input string) bool

IsPlainText returns false if at least one of the runes in the input is not represented as a plain text in a file. Null is an exception.

Types

This section is empty.

Jump to

Keyboard shortcuts

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