Utils

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeOutputDir added in v1.3.0

func MakeOutputDir(folderTitle string) (string, string, error)

MakeOutputDir makes the output directory, sends the full path and the sub dir value for making files as return values for the function as well as any errors that might have occurred since this hits a world time API.

func RoundTo added in v1.2.3

func RoundTo(n float64, decimals uint32) float64

RoundTo rounds a float number to a specified number of decimal places.

func SplitQueries added in v1.4.0

func SplitQueries(queries string) (formattedQueries []string)

SplitQueries is a simple function that splits a text string of queries typically from a .sql file and returns a slice of formatted queries that has had the "\n" and spaces removed from each end. It does it's initial split by using the ";" character, so have each query end with it.

Types

type TimeExt

type TimeExt struct {
	T time.Time
	Y int
}

func (TimeExt) DaysInMonth

func (tm TimeExt) DaysInMonth() int

func (TimeExt) DaysInYear

func (tm TimeExt) DaysInYear() int

func (TimeExt) EndOfMonth

func (tm TimeExt) EndOfMonth() time.Time

func (TimeExt) EndOfYear

func (tm TimeExt) EndOfYear() time.Time

EndOfYear end of year

Jump to

Keyboard shortcuts

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