util

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 1 Imported by: 0

README

util

Documentation

Generic utility library in Go

Library

Installation
go get -u github.com/linuxfreak003/util

or use go mod

Example
package main

import (
    "github.com/linuxfreak003/util"
    "github.com/linuxfreak003/util/slice"
)

func main() {
    _ = util.Round(1.2345, 3) // Returns 1.235

    _ = slice.Map([]int{1,2,3,4}, func(i int) float64{
        return float64(i * i)
    }) // will return []int{1.0, 4.0, 9.0, 16.0}
}

The available functions are listed in documentation. Another good place to look for an example is in util_test.go.

Documentation

Overview

Package util contains generic utility functions

Package util is a library of generic utility functions.

Directories

Path Synopsis
Package cache is a very simple cache library that supports generic types
Package cache is a very simple cache library that supports generic types
Package maps contains generic functions for maps
Package maps contains generic functions for maps
Package number contains generic functions primarily for use with numbers
Package number contains generic functions primarily for use with numbers
Package slice contains generic utility functions on slices
Package slice contains generic utility functions on slices

Jump to

Keyboard shortcuts

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