modulepackage
0.0.0-20230629151031-44f814d29ed9
Repository: https://github.com/doitmagic/go-snippets.git
Documentation: pkg.go.dev
# README
go-snippets
Go language snippets
- logger : simply concurrent logger made using
sync
andio
packages - hashtable : a hashtable made in golang
- graphql example
- patterns:
- Creational
- builder
- factory
- singleton
- Messaging
- fan out 3.Structural
- decorator
- Creational
- prepend : because it didn't exist let's add it :joy:
- broadcast : one event to multiples channels
- detectClosedChannel : detect if a channel is closed, and we can write to it
- slice tricks with experimental packages
- What is happening if we use a slice like parameters in a function, sending it by value? It will be changed? The response is here https://github.com/doITmagic/go-snippets/blob/main/canGenerateBugs/sliceByValue/sliceByValue.md
- Slices package
- one function slices.SameUnderlying(...) that test if two slices (any types) have the same underlying array using generics
Explanation here https://github.com/doITmagic/go-snippets/wiki/create-slice-from-nothing - slices.IsSubsetOf(...) that test if a slice is a subset of another slice using generics
- one function slices.SameUnderlying(...) that test if two slices (any types) have the same underlying array using generics
# Packages
Package broadcast package that provides an abstraction to broadcast values to multiple goroutines.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package prepend Go have a built-in append function that allows for the appending of a value to a slice.
No description provided by the author
No description provided by the author