fileutils

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src, dst string) error

Recursively copy a directory from src to dst

Literally uses cp -r

func CopyFile

func CopyFile(src, dst string) error

Copy file from filepath "src" to "dst"

Uses os and io libs

func CopyFilesInDir

func CopyFilesInDir(src, dst string) error

Copies the (non-dir) files from one dir to another

Not recursive

func Diff

func Diff(src, dst string) error

diff two files using the diff command built into your shell

func GetGoFiles added in v0.0.17

func GetGoFiles(filePath string, includeTestFiles bool) ([]string, error)

If filePath is a directory, get all files inside it ending in "go".

If filePath is a valid file ending in ".go", return single length list

If filePath is a valid file *not* ending in ".go", return zero length list

If includeTestFiles is false, exclude files ending in "_test.go"

func OutputGoFile

func OutputGoFile(filePath, packageName, body string, imports []impt.Impt) error

Format contents of go file and output it into filePath

Types

This section is empty.

Jump to

Keyboard shortcuts

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