utils

package
v0.0.0-...-bc78c8b Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DollarEuroRate = 0.8749291093063332

DollarEuroRate is a value used to convert dollars to euros

Variables

This section is empty.

Functions

func GetGroupByDatesIDClause

func GetGroupByDatesIDClause(startDate time.Time, endDate time.Time) bson.M

GetGroupByDatesIDClause returns group by date clause to be used on aggregate query

func Merge

func Merge(x1, x2 interface{}) (interface{}, error)

merge merges the two JSON-marshalable values x1 and x2, preferring x1 over x2 except where x1 and x2 are JSON objects, in which case the keys from both objects are included and their values merged recursively.

It returns an error if x1 or x2 cannot be JSON-marshaled.

func RoundFloorDecimals

func RoundFloorDecimals(n float32, decimalPlaces int) float32

RoundFloorDecimals rounds number specified of decimal places

Types

This section is empty.

Jump to

Keyboard shortcuts

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