utils

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DateStrToTime

func DateStrToTime(dateStr string) (time.Time, error)

expects DD/MM/YYYY

func FileExists

func FileExists(fileLocation string) bool

func HourString

func HourString(i int) (hourString string)

func IsWeekend

func IsWeekend(t time.Time) bool

A weekend is Friday 10pm UTC to Sunday 10:05pm UTC

func MinI

func MinI(a, b int) int

func Mod

func Mod(a, b int) int

func Quiet

func Quiet() func()

func StringToTimestamp

func StringToTimestamp(str string) time.Time

Expects a format like 2021-08-12

Types

type FileSystem

type FileSystem interface {
	Create(string) (io.WriteCloser, error)
	Open(string) (io.ReadCloser, error)
}

type LocalFS

type LocalFS struct{}

func (LocalFS) Create

func (LocalFS) Create(name string) (io.WriteCloser, error)

func (LocalFS) Open

func (LocalFS) Open(name string) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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