Documentation ¶
Index ¶
- func ByteToUtf8(iso8859_1_buf []byte) string
- func DirCheckExists(path string) (exists bool)
- func DirMake(path string) error
- func DirRemoveContents(dir string) error
- func FileCheckExists(name string) (exists bool)
- func FileFindInTree(name string) (filePath string, err error)
- func IdRand(size int) (ID string)
- func IdRand20() (ID string)
- func Round(args ...interface{}) float64
- func SizeToString(value int64) string
- func StringRemoveSpellingAccents(text string) string
- func TraceToLog() (file string, line int, funcName string, ok bool)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteToUtf8 ¶
func DirCheckExists ¶
func DirRemoveContents ¶
func FileCheckExists ¶
func FileFindInTree ¶
func Round ¶
func Round(args ...interface{}) float64
Arredonda um número de ponto flutuante para o inteiro mais próximo Round(valor, [em_torno], [dígitos_decimais]) float64 float64 valor float64 em torno = 0.5 float64 dígitos decimais
Example ¶
fmt.Printf("%v\n", Round(1.22)) fmt.Printf("%v\n", Round(1.22, 0.2)) fmt.Printf("%v\n", Round(1.22, 0.5)) fmt.Printf("%v\n", Round(1.22, 0.7)) fmt.Printf("%v\n", Round(1.22, 0.5, 1.0)) fmt.Printf("%v\n", Round(1.33, 0.5, 1.0)) fmt.Printf("%v\n", Round(3.14159265358979323, 0.5, 8.0))
Output: 1 2 1 1 1.2 1.3 3.14159265
func SizeToString ¶
func StringRemoveSpellingAccents ¶
Example ¶
var text string = "áéíóúàèìòùâêîôûãẽĩõũäëïöüñçÁÉÍÓÚÀÈÌÒÙÂÊÎÔÛÃẼĨÕŨÄËÏÖÜÑÇ" fmt.Print(StringRemoveSpellingAccents(text))
Output: aeiouaeiouaeiouaeiouaeiouncAEIOUAEIOUAEIOUAEIOUAEIOUNC
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.