glop

package module
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

README

glop

Package glop is Go Language Outtake Packages: Stuff that should have been in the Go standard library, and convenient wrappers that make high-frequency steps more convenient (often using generics).

Everything in here is very short and lightweight -- anything requiring more than a few lines of code should be in its own separate repository.

  • dirs has various file-system directory-related functions, including a simple FileExists and various convenience versions for getting a slice of files in a directory.

  • num has a generic version of Abs, a duplicate set of numeric constraints from the std constraints package with the much shorter package name of num and including the overlooked Number, a generic way to set any number to any other number, and conversion between numbers and bools.

  • bools for a Booler and BoolSetter interface, and To/From String methods.

  • indent provides space and tab based indent string generators.

  • runes provides some key elements of strings and bytes operating on a []rune slice, for faster conversion-free performance in cases where you have a slice of runes.

  • atomctr provides convenient method wrappers around sync/atomic for the common case of a shared int64 counter.

  • fatomic provides wrappers around sync/atomic methods for doing atomic operations on floating point numbers.

  • sentence provides functions for creating formatted sentences.

Documentation

Index

Constants

View Source
const (
	// Version is the version of this package being used
	Version = "v0.1.11"
	// GitCommit is the commit just before the latest version commit
	GitCommit = "4dce1ae"
	// VersionDate is the date-time of the latest version commit in UTC (in the format 'YYYY-MM-DD HH:MM', which is the Go format '2006-01-02 15:04')
	VersionDate = "2024-01-08 19:57"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package atomctr implements basic atomic int64 counter
Package atomctr implements basic atomic int64 counter
Package datasize provides a data size type and constants.
Package datasize provides a data size type and constants.
Package dedupe implements a de-duplication function for any comparable slice type, efficiently using a map to check for duplicates.
Package dedupe implements a de-duplication function for any comparable slice type, efficiently using a map to check for duplicates.
Package dirs provides various utility functions in dealing with directories such as a list of all the files with a given (set of) extensions and finding paths within the Go source directory (GOPATH, etc)
Package dirs provides various utility functions in dealing with directories such as a list of all the files with a given (set of) extensions and finding paths within the Go source directory (GOPATH, etc)
Package elide provides basic text eliding functions.
Package elide provides basic text eliding functions.
Package fatomic provides floating-point atomic operations
Package fatomic provides floating-point atomic operations
Package indent provides trivial indentation generation methods: Tabs, Spaces, and Indent with a selector.
Package indent provides trivial indentation generation methods: Tabs, Spaces, and Indent with a selector.
Package nptime provides a non-pointer version of the time.Time struct that does not have the location pointer information that time.Time has, which is more efficient from a memory management perspective, in cases where you have a lot of time values being kept: https://segment.com/blog/allocation-efficiency-in-high-performance-go-services/
Package nptime provides a non-pointer version of the time.Time struct that does not have the location pointer information that time.Time has, which is more efficient from a memory management perspective, in cases where you have a lot of time values being kept: https://segment.com/blog/allocation-efficiency-in-high-performance-go-services/
Package option provides optional (nullable) types.
Package option provides optional (nullable) types.
Package runes provides a small subset of functions that are found in strings, bytes standard packages, for rune slices.
Package runes provides a small subset of functions that are found in strings, bytes standard packages, for rune slices.
Package sentence provides functions for creating formatted sentences.
Package sentence provides functions for creating formatted sentences.

Jump to

Keyboard shortcuts

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