libyear

package
v0.0.0-...-342267f Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Calc

func Calc(p ...Pair) time.Duration

Calc returns the summed time distance (as a time.Duration) between a set of Pairs of modules. TODO: sum can only represent ~290 years before overflowing, but we don't actually need nanosecond precision! Probably worth switching to hour-based summing here.

func DecimalYear

func DecimalYear(d time.Duration) string

DecimalYear conversts a time.Duration (which is in nsec) to a two-decimal-place count of years.

Types

type Info

type Info struct {
	Version string    // version string
	Time    time.Time // commit time
}

Info defines a version and a commit time for that version

type Pair

type Pair struct {
	Name    string
	Latest  Info
	Current Info
}

Pair is a set of versions for a dependency (current and newest possible)

Jump to

Keyboard shortcuts

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