util

package
v0.0.0-...-95a4c08 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPrice = 1000
View Source
const RequestIdentifier = "X-Request-ID"

Variables

This section is empty.

Functions

func CalculateTotalAmount

func CalculateTotalAmount(products []data.Product) float64

func CurrentISOTime

func CurrentISOTime() string

func FormatTimeToISO

func FormatTimeToISO(timeToFormat time.Time) string

func IsDevMode

func IsDevMode(s string) bool

func RandomPrice

func RandomPrice() float64

Types

type ContextKey

type ContextKey string

type SignalHandler

type SignalHandler interface {
	OnSignal(deferFunc func())
}

func NewSignalHandler

func NewSignalHandler(signalsToListen ...os.Signal) SignalHandler

Jump to

Keyboard shortcuts

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