utilities

package
v0.0.0-...-4a20995 Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskForConfirmation

func AskForConfirmation(message string) bool

askForConfirmation uses Scanln to parse user input. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user. Typically, you should use fmt to print out a question before calling askForConfirmation. E.g. fmt.Println("WARNING: Are you sure? (yes/no)")

func DeleteFile

func DeleteFile(path string) error

func GetDirectories

func GetDirectories(path string) ([]string, error)

func GetFiles

func GetFiles(path string) ([]string, error)

func GetProcessedDirectories

func GetProcessedDirectories(path string) ([]models.Directory, error)

func SplitParts

func SplitParts(number int, chunkSize int) ([]models.Part, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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