utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomShortString

func GenerateRandomShortString(length int) (string, error)

Generates a random string that is used as the unique part of a shortlink.

func IsStringValidURL

func IsStringValidURL(str string) bool

Checks whether or not the passed string is a valid URL.

Needed for instance for validating long and short links and for checking whether they're okay to be created/deleted or okay to be further proccessed.

func PrintStartupBanner

func PrintStartupBanner()

Prints some ASCII art TODO: Print version as well

func StartupDelay

func StartupDelay(duration time.Duration)

Creates a small startup delay For example helpful for waiting for DB container (e.g. in the case of Docker Compose)

Types

This section is empty.

Jump to

Keyboard shortcuts

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