From 27a858924b6c0a7e0d18f0fde232e1d43f33f800 Mon Sep 17 00:00:00 2001 From: Andrew McDermott Date: Thu, 4 Apr 2024 12:19:54 +0100 Subject: [PATCH] Use tagged release of github.com/frobware/comptime@v0.1.0 Ran: go mod tidy; go mod vendor --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/frobware/comptime/README.md | 16 ++++++++++------ .../frobware/comptime/duration_parser.go | 11 ++++++----- vendor/modules.txt | 2 +- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index f50a43c..9313996 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/frobware/haproxytime go 1.20 -require github.com/frobware/comptime v0.0.0-20240404101027-05b58ca911cd +require github.com/frobware/comptime v0.1.0 diff --git a/go.sum b/go.sum index 1ac5994..42aec50 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -github.com/frobware/comptime v0.0.0-20240404101027-05b58ca911cd h1:O1xWkxWDL+y19a/VhXqnNro93b+56isGgHbQW9KiqGs= -github.com/frobware/comptime v0.0.0-20240404101027-05b58ca911cd/go.mod h1:W5rh39LLUPntCkLRwwuL/tH0xCN0IUV1PhDbDzD9Gco= +github.com/frobware/comptime v0.1.0 h1:RV2L3DNOIPpnh1sP9mSLGR3pAnC0om/BQ/EX+HaA/+Q= +github.com/frobware/comptime v0.1.0/go.mod h1:W5rh39LLUPntCkLRwwuL/tH0xCN0IUV1PhDbDzD9Gco= diff --git a/vendor/github.com/frobware/comptime/README.md b/vendor/github.com/frobware/comptime/README.md index d8b966c..c84cb73 100644 --- a/vendor/github.com/frobware/comptime/README.md +++ b/vendor/github.com/frobware/comptime/README.md @@ -1,10 +1,10 @@ -# Parse time durations, with support for days +# Parse composite time durations, including support for days -Package comptime provides specialised duration parsing -functionality with features beyond the standard library's -time.ParseDuration function. It adds support for extended time units -such as "days", denoted by "d", and optionally allows the parsing of -composite durations in a single string like "1d5m200ms". +The `comptime` package (composite time) offers functionality for +parsing durations, extending the capabilities of the standard +library's `time.ParseDuration` function. It introduces support for an +additional time unit, 'days' (denoted by 'd'), and enables the parsing +of composite durations from a single string, such as '1d5m200ms'. Key Features: @@ -14,6 +14,10 @@ Key Features: - Capable of parsing composite durations such as "24d20h31m23s647ms". - Ensures parsed durations are non-negative. +- Custom Range Checking: Allows the caller to define their own range + constraints on parsed durations through a BoundsChecker callback. + This enables early termination of the parsing process based on + user-defined limits. ## Dev Build diff --git a/vendor/github.com/frobware/comptime/duration_parser.go b/vendor/github.com/frobware/comptime/duration_parser.go index 0c6ebc0..5ad2295 100644 --- a/vendor/github.com/frobware/comptime/duration_parser.go +++ b/vendor/github.com/frobware/comptime/duration_parser.go @@ -1,8 +1,9 @@ -// Package comptime provides specialised duration parsing -// functionality with features beyond the standard library's -// time.ParseDuration function. It adds support for extended time -// units such as "days", denoted by "d", and optionally allows the -// parsing of composite durations in a single string like "1d5m200ms". +// Package comptime (composite time) offers functionality for parsing +// durations, extending the capabilities of the standard library's +// `time.ParseDuration` function. It introduces support for an +// additional time unit, 'days' (denoted by 'd'), and enables the +// parsing of composite durations from a single string, such as +// '1d5m200ms'. // // Key Features: // diff --git a/vendor/modules.txt b/vendor/modules.txt index 3a85384..da59a23 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,3 +1,3 @@ -# github.com/frobware/comptime v0.0.0-20240404101027-05b58ca911cd +# github.com/frobware/comptime v0.1.0 ## explicit; go 1.20 github.com/frobware/comptime