Documentation
¶
Overview ¶
Package anvil contains the helper function/struct
Index ¶
Constants ¶
View Source
const ( // AirmidPackageName is the constant name of airmid package. AirmidPackageName = "github.com/anyvoxel/airmid" // AirmidPackageVersion is tthe constant version of airmid package. AirmidPackageVersion = "v0.1.0" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FnOption ¶
type FnOption[T any] struct { Fn func(*T) }
FnOption is an generic function helper for Option.
type NoCopy ¶
type NoCopy struct{}
NoCopy may be embedded into structs which must not be copied after the first use.
See https://github.com/golang/go/issues/8005#issuecomment-190753527 for details.
type Option ¶
type Option[T any] interface { // Apply applies this configuration to the given option Apply(*T) }
Option is an generic configuration helper.
func NewFnOption ¶
NewFnOption will instant an Option with f.
type WaitGroupWrapper ¶
WaitGroupWrapper is a help struct for sync.WaitGroup.
func (*WaitGroupWrapper) Wrap ¶
func (w *WaitGroupWrapper) Wrap(cb func())
Wrap will handle sync.WaitGroup Add and Done.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package conv provide the helper function to convert data types & string
|
Package conv provide the helper function to convert data types & string |
|
Package parallel provide helper function to execute parallel task
|
Package parallel provide helper function to execute parallel task |
|
Package pointer provide the helper function to convert pointer
|
Package pointer provide the helper function to convert pointer |
|
Package xerrors defines the helpful errors & function
|
Package xerrors defines the helpful errors & function |
|
Package xreflect provide the helper function with reflect
|
Package xreflect provide the helper function with reflect |
|
Package xtime provide the helper function to access time
|
Package xtime provide the helper function to access time |
Click to show internal directories.
Click to hide internal directories.