goutil

module
v2.29.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT

README

A bunch of useful structures, constants and helpers for Go

Test Status Codecov License

Installation

go get github.com/heffcodex/goutil/v2

Contents

Most of the methods over standard types (primitives, arrays, maps) are generic.

  • uconst - useful constants:
    • sizes
  • uerr - error helpers:
    • call chain stopper
  • umap - map helpers:
    • convert (from array)
  • umath - math helpers:
    • generic min
    • generic max
    • generic abs
  • umime - MIME helpers:
    • stream MIME validation
    • MIME-aware file extension replacement
  • uslice - slice helpers:
    • convert (from map)
    • map
    • merge
    • in-place reverse
    • clustering
    • diffing
    • filtering
    • searching
  • usync - thread-safe types:
    • generic syncmap
  • utime - time.Time wrapper:
    • marshalling/unmarshalling:
      • supported formats:
        • binary
        • json
        • protobuf
        • sql
        • text
      • custom layout (via global variables)
      • using local time by default
    • day/week/month shift methods
    • custom start-of-week day (via global variable)
    • month name translation (currently only for Russian):
      • singular
      • prepositional
  • utype - generic type interfaces:
    • integers
    • chars
    • comparables
  • uvalue - value helpers:
    • conditional pipe
    • references
    • generic IsZero

Examples

Sorry, there are no such things (yet?)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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