common

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDirectories

func CheckDirectories(directories ...string) error

func CopyFile

func CopyFile(src string, dest string) error

func DeleteFilesByExtension

func DeleteFilesByExtension(dir string, exts []string) error

ej: gotools.DeleteFilesByExtension(main_folder\files, []string{".js", ".css", ".wasm"})

func ExecCommand

func ExecCommand(command string, args ...string) (string, error)

func FileCheck

func FileCheck(dir string, files_names ...string) ([]fs.DirEntry, error)

func FileWrite

func FileWrite(pathFile string, data bytes.Buffer) error

pathFile ej: "theme/index.html" data ej: *bytes.Buffer NOTA: la data del buf sera eliminada después de escribir el archivo

func FindFilesWithNonZeroSize

func FindFilesWithNonZeroSize(dir string, filenames []string) error

func FindFirstFileWithExtension

func FindFirstFileWithExtension(dir, extension string) (string, error)

func GetRootFiles

func GetRootFiles(dir, ext string, onlyNamesWithCapitalLetter bool) (out []string, err error)

func PrintError

func PrintError(messages ...string)

func PrintInfo

func PrintInfo(messages ...string)

func PrintOK

func PrintOK(messages ...string)

func PrintWarning

func PrintWarning(messages ...string)

func ReadAssets

func ReadAssets(Dir string, Html, Css, Js, Svg out) error

func ReadFiles

func ReadFiles(dir, ext string, out *bytes.Buffer) error

dir ej: modules/mymodule ext ej: .js, .html, .css

func ShowErrorAndExit

func ShowErrorAndExit(message any)

func TextCount

func TextCount(filePath string, textSearchInContent string) int

ej: index.html", "info_id" static\main.js", "js\code.js"

func TextMinify

func TextMinify(text *string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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