Documentation ¶
Overview ¶
Package utils implements helpful funcs that are reused throughout the app and provide some simply, yet redundantly coded, functionaly. Think of this package as storing some "generic" funcs that golang doesn't provide or funcs that we reuse in a bunch of places.
This package should not import any other packages. This package should only be imported into other packages. This is to prevent import loops. Plus, considering that these are basic helper funcs there should be no need to depend on anything else (maybe the std lib).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateStartAndEndDate ¶ added in v2.1.0
func ValidateStartAndEndDate(startDateFromGUI, endDateFromGUI string, equalOkay bool) (startDateForQuery, endDateForQuery, errMsg string, err error)
ValidateStartAndEndDate checks if valid start and end dates were provided and that the start date is before the end date. This is used for validating filters for queries. The defaultRange is used if a start date was not provided to create a start date that is defaultRange days in the past.
Inputs and outputs are both yyyy-mm-dd formatted.
Types ¶
This section is empty.