utilities

package
v0.0.0-...-dc0472d Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPrice = 1000
)

Variables

This section is empty.

Functions

func CalculateTotalAmount

func CalculateTotalAmount(products []data.Product) float64

CalculateTotalAmount calculates the total amount of the order based on the prices of products.

func CurrentISOTime

func CurrentISOTime() string

CurrentISOTime returns the current UTC time in RFC3339 format.

func FormatTimeToISO

func FormatTimeToISO(timeToFormat time.Time) string

FormatTimeToISO returns the time in RFC3339 format.

func IsDevMode

func IsDevMode(s string) bool

IsDevMode - Checks if the given string denotes any of the development environment.

func RandomPrice

func RandomPrice() float64

RandomPrice - Generates a random price between 0 and 1000.

Types

This section is empty.

Jump to

Keyboard shortcuts

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