utils

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: BSD-2-Clause, ISC Imports: 3 Imported by: 0

Documentation

Overview

Package utils provides common utility functions.

Provided functionalities: - sorting - comparators

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TimeComparator

func TimeComparator(a, b time.Time) int

TimeComparator provides a basic comparison on time.Time

func ToString

func ToString(value interface{}) string

ToString converts a value to string.

Types

type Comparator

type Comparator[T any] func(x, y T) int

type Comparator2 added in v0.9.3

type Comparator2[T any] func(x string, y T) int

a Comparator2 is a special thing for Ceiling2 and Floor2

Jump to

Keyboard shortcuts

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