moon

package module
v0.1.76 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 7 Imported by: 1

README

moon

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDuration

func FormatDuration(d time.Duration) string

func FormatDurationDays

func FormatDurationDays(d time.Duration) string

func FormatDurationMs

func FormatDurationMs(d time.Duration) string

func FormatTime

func FormatTime(t time.Time) string

func Panic

func Panic(v ...any)

func Panicf

func Panicf(format string, v ...any)

func Recover

func Recover(onError func(string))

func Strict added in v0.1.32

func Strict(err error, v ...any)

func StrictFn added in v0.1.32

func StrictFn(err error, fn any)

func Strictf added in v0.1.32

func Strictf(err error, format string, v ...any)

func WaitInterrupt

func WaitInterrupt() os.Signal

Types

type Time

type Time struct {
	Hours        int
	Minutes      int
	Seconds      int
	Milliseconds int
}

func DurationToTime

func DurationToTime(d time.Duration) Time

func NewTime

func NewTime() *Time

func Now

func Now() *Time

func (Time) Days

func (this Time) Days() (days, hours int)

func (Time) Format

func (this Time) Format() string

func (Time) FormatDays

func (this Time) FormatDays() string

func (Time) FormatMs

func (this Time) FormatMs() string

func (*Time) SetDailyHours

func (this *Time) SetDailyHours(h int)

func (*Time) SetMinutes

func (this *Time) SetMinutes(m int)

func (*Time) SetNow

func (this *Time) SetNow() *Time

func (*Time) SetSeconds

func (this *Time) SetSeconds(s int)

func (*Time) SetTime

func (this *Time) SetTime(t time.Time) *Time

func (Time) TotalMinutes

func (this Time) TotalMinutes() int

func (Time) TotalSeconds

func (this Time) TotalSeconds() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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