utils

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package utils represent utils for every package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoDiscoverYML

func AutoDiscoverYML(path string) ([]string, error)

AutoDiscoverYML find yaml in given path

func EnvToMap

func EnvToMap() (map[string]string, error)

EnvToMap convert env to map

func LogDebug

func LogDebug(s string, v ...interface{})

LogDebug log println if debug mode

func ParseDuration

func ParseDuration(s string) (time.Duration, error)

ParseDuration parses a duration string. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h", "d", "w".

func RandString

func RandString(n int) string

RandString generate a random string of lenght "n"

func TakeScreenshotWithChromedp

func TakeScreenshotWithChromedp(url, file string) error

TakeScreenshotWithChromedp takes a screenshot of the current browser window.

func Version

func Version() string

Version is the current version of the application.

Types

type CustomContextKey

type CustomContextKey string

CustomContextKey is a custom context key

Jump to

Keyboard shortcuts

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