util

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 6 Imported by: 5

Documentation

Overview

Package util provides utility functions for working with files and directories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSpaces

func CreateSpaces(n int) string

func ListFilesInDir

func ListFilesInDir(dir string) ([]string, error)

func ListGlob added in v0.8.7

func ListGlob(glob string) ([]string, error)

func MD5Hash added in v0.7.12

func MD5Hash(text string) string

func MD5HashByte added in v0.7.21

func MD5HashByte(text []byte) string

func MkdirPAndWriteFile added in v0.7.14

func MkdirPAndWriteFile(filePath, content string) error

MkdirPAndWriteFile writes the edited content to the file

func MkdirPFromFile added in v0.9.4

func MkdirPFromFile(filePath string) error

func ReadFileP

func ReadFileP(filepath string) string

ReadFileP is a convenience function that calls ReadFile and panics if an error occurs.

func ReplaceExt added in v0.8.9

func ReplaceExt(file string, ext string) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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