tools

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package tools assemble useful functions used by other packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureOutput

func CaptureOutput(f func()) string

CaptureOutput permit to catch os stdout/stderr

func CheckIsFile

func CheckIsFile(f string) (err error)

CheckIsFile check if provided file exist

func GetPagination

func GetPagination(page int, start int, end int, rangeLimit int) (startLimit int, EndLimit int)

GetPagination permit to set start limit and end limit for pagination

func RandString

func RandString(n int) string

RandString return random string with max int size

func RandStringInt

func RandStringInt(n int) string

RandStringInt return random string and int with max int size

func RandomValueFromSlice

func RandomValueFromSlice(s []string) string

RandomValueFromSlice return a string slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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