tm

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: MIT Imports: 6 Imported by: 0

README

tm

CI

Time Calculator.

Installation

brew install winebarrel/tm/tm

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dur

type Dur time.Duration

func (*Dur) Capture

func (v *Dur) Capture(values []string) error

type Expr

type Expr struct {
	Value    Value     `@@`
	OpValues []OpValue `( SP* @@ )*`
}

func (*Expr) Eval

func (expr *Expr) Eval() time.Duration

type OpValue

type OpValue struct {
	Op    string `@Op`
	Value Value  `SP* @@`
}

type Result

type Result time.Duration

func Eval

func Eval(str string) (Result, error)

func (Result) String

func (r Result) String() string

type Tm

type Tm time.Duration

func (*Tm) Capture

func (v *Tm) Capture(values []string) error

type Value

type Value struct {
	Tm  *Tm  `@Tm`
	Dur *Dur `| ( @Dur1 | @Dur2 | @Dur3 )`
}

func (*Value) Duration

func (v *Value) Duration() time.Duration

Directories

Path Synopsis
cmd
tm command
internal

Jump to

Keyboard shortcuts

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