moon

package module
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: MIT Imports: 6 Imported by: 1

README

moon

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

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

func Checkf

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

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 WaitInterrupt

func WaitInterrupt()

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