gotools

package module
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 19 Imported by: 1

README

gotools

Documentation

Index

Constants

View Source
const DeleteEmptyFolderResponse = "directorio con archivos. no fue eliminado"

Variables

This section is empty.

Functions

func AddStringContendFromDirAndExtension added in v0.0.12

func AddStringContendFromDirAndExtension(dir, ext string, out *string) error

ej: dir/files, .svg

func AddStringContentFromFile added in v0.0.12

func AddStringContentFromFile(file_path string, out *string) error

func AreSliceMapsIdentical added in v0.0.15

func AreSliceMapsIdentical(maps_a, maps_b []map[string]string) bool

Función para comparar dos slices de mapas sin importar el orden

func CombineStringArray added in v0.0.33

func CombineStringArray(random bool, arrays_in ...[]string) (out []string)

func CopyFile added in v0.0.11

func CopyFile(src string, dest string) error

func CreateFolderIfNotExist added in v0.0.17

func CreateFolderIfNotExist(folder_path string) error

func DeleteEmptyFolder added in v0.0.18

func DeleteEmptyFolder(folder_path string) error

func DeleteFilesByExtension added in v0.0.8

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

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

func DeleteIfFolderSizeExceeds added in v0.0.17

func DeleteIfFolderSizeExceeds(folder_path string, maxSizeMB int64) error

func ExtractTwoPointArgument added in v0.0.2

func ExtractTwoPointArgument(option string, field *string) error

func FileCheck added in v0.0.9

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

func FileWrite added in v0.0.11

func FileWrite(file_name string, data *bytes.Buffer) error

file_name ej: "theme/index.html"

func FindFile added in v0.0.7

func FindFile(dir, file_name string) (content string, err error)

func FindFilesWithNonZeroSize

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

func FindFirstFileWithExtension added in v0.0.7

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

func GetNamesFromDirectoryExtensionAndPattern added in v0.0.9

func GetNamesFromDirectoryExtensionAndPattern(dir, ext, pattern string) (out []string, err error)

ej files, .go, `Input: input\.(\w+)\(\)`

func GetNamesFromFileAndPattern added in v0.0.6

func GetNamesFromFileAndPattern(file_path, pattern string) (out []string, err error)

ej files/file.txt, `Input: input\.(\w+)\(\)`

func NormalizeTextData added in v0.0.33

func NormalizeTextData(in *string)

remueve tildes,espacio blanco inicio-final y todo a minúscula

func ReadFile added in v0.0.11

func ReadFile(file string, buffer_out *bytes.Buffer) error

func ReadFiles added in v0.0.11

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

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

func RemoveAcent added in v0.0.33

func RemoveAcent(in string) (out string)

func RemoveSuffixIfPresent added in v0.0.21

func RemoveSuffixIfPresent(path *string, suffix string)

remover \cmd ej: "mi_directorio\cmd" "\\cmd"

func RemoveUfeffFromString added in v0.0.33

func RemoveUfeffFromString(in *string)

func RutNormalize added in v0.0.33

func RutNormalize(rutIn *string) error

func TextExists added in v0.0.4

func TextExists(file_path string, text_search_or_path_content string) int

ej: gotools.TextExists(index.html", "info_id") gotools.TextExists(static\main.js", "js\code.js")

func TextMinify added in v0.0.10

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