go-pkgs

module
v0.0.0-...-9e0c95a Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT

README

go-pkgs CICD cod cov

Collection of Go packages that I use in my projects. Implemented with go generics. Thus they are compatible with Go 1.18+.

Installation

go get github.com/neurocode-io/go-pkgs@latest

Packages

slice

Slice is a package that provides a set of functions to work with slices.

map

Map is a package that provides a set of functions to work with maps.

set

Set is a package that provides a generic set implementation.

async
group := result.Group[ResultType]{}

ctx := context.Background()
threshold := 1

group, ctx := resultgroup.WithErrorsThreshold[ResultType](ctx, threshold)

group.Go(func() ([]ResultType, error) {
    return []ResultType{}, nil
})

results, err := group.Wait()
if err != nil {
		fmt.Println("Error:", err)
    fmt.Println("Wrapped errors", err.Unwrap())
	}
streams

Coming soon

Directories

Path Synopsis
Package m provides functions for working with maps.
Package m provides functions for working with maps.
Package result provides concurrency utilities for accumulating results and managing errors.
Package result provides concurrency utilities for accumulating results and managing errors.
Package set provides a generic set implementation.
Package set provides a generic set implementation.
Package slice provides a set of functions to manipulate slices.
Package slice provides a set of functions to manipulate slices.

Jump to

Keyboard shortcuts

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