Discover Packages
github.com/glitchedgitz/cook/v2
examples
concurrent
command
Version:
v2.3.0
Opens a new window with list of versions in this module.
Published: Mar 6, 2026
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Cook Concurrent Generation Example
This example demonstrates how to use the Cook Generator for efficient concurrent pattern generation.
What This Example Shows
How to initialize a CookGenerator once and share it across multiple goroutines
How to concurrently generate multiple different pattern sets
How to collect and aggregate results from concurrent operations
How to use different method combinations with the generator
Running the Example
cd v2/examples/concurrent
go run main.go
Key Concepts
The CookGenerator provides an efficient way to reuse shared resources across multiple operations. This example demonstrates:
Using cook.NewGenerator() to create a single generator with pre-initialized resources
Running concurrent generation tasks with goroutines
Using Go's concurrency patterns (WaitGroup, channels) for coordinating work
Generating patterns with various method combinations:
Basic patterns
Range patterns
Method transformations (uppercase, md5, base64, etc.)
Column-specific methods
This approach is particularly useful for applications that need to generate large numbers of patterns efficiently, leveraging multiple cores for parallel processing.
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.