package
Version:
v0.0.0-...-dfd24c6
Opens a new window with list of versions in this module.
Published: Nov 14, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func ChannelToSlice[t any](channel <-chan t) []t
channelToSlice converts a channel to a slice by reading all values from the channel.
func Max[T ordered](values ...T) T
func Min[T ordered](values ...T) T
Result returns the result of a function call and ignores the error.
This saves lines when you don't care about the error and want to inline the call.
For example, instead of writing:
val, _ := someFunc()
foo(val)
You can write:
foo(Result(someFunc()))
Source Files
¶
Click to show internal directories.
Click to hide internal directories.