Documentation ¶
Overview ¶
SPDX-FileCopyrightText: 2020 Santiago De la Cruz <delacruzsantiago12@gmail.com> SPDX-License-Identifier: BSD-3-Clause
Code below is a modified version of https://github.com/xhit/go-str2duration: only addition is support year intervals.
Index ¶
- func ErrWrap[T any](def T) func(T, error) T
- func IsDir(path string) bool
- func IsValidHTML(body []byte) bool
- func ParseDuration(s string) (time.Duration, error)
- func ParseQueryString(queryStrings []byte) map[string]string
- func RegexesAnyMatch(payload string, regexes ...string) bool
- func RegexesMatch(payload string, regexes ...string) bool
- func StringSliceContains(slice []string, item string) bool
- func StringSliceDistinct(slice []string) (distinct []string)
- func StringSlicesEqual(a, b []string) bool
- type ZStdLogger
- func (l ZStdLogger) Fatal(args ...interface{})
- func (l ZStdLogger) Fatalf(format string, args ...interface{})
- func (l ZStdLogger) Fatalln(args ...interface{})
- func (l ZStdLogger) Print(args ...interface{})
- func (l ZStdLogger) Printf(format string, args ...interface{})
- func (l ZStdLogger) Println(args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidHTML ¶
func ParseDuration ¶
ParseDuration parses a duration string. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h", "d", "w".
func ParseQueryString ¶
func RegexesAnyMatch ¶
func RegexesMatch ¶
func StringSliceContains ¶
func StringSliceDistinct ¶
func StringSlicesEqual ¶
Types ¶
type ZStdLogger ¶
type ZStdLogger struct {
// contains filtered or unexported fields
}
func NewZStdLogger ¶
func NewZStdLogger(fd ...io.Writer) ZStdLogger
func (ZStdLogger) Fatal ¶
func (l ZStdLogger) Fatal(args ...interface{})
func (ZStdLogger) Fatalf ¶
func (l ZStdLogger) Fatalf(format string, args ...interface{})
func (ZStdLogger) Fatalln ¶
func (l ZStdLogger) Fatalln(args ...interface{})
func (ZStdLogger) Print ¶
func (l ZStdLogger) Print(args ...interface{})
func (ZStdLogger) Printf ¶
func (l ZStdLogger) Printf(format string, args ...interface{})
func (ZStdLogger) Println ¶
func (l ZStdLogger) Println(args ...interface{})
Source Files ¶
Click to show internal directories.
Click to hide internal directories.