GoStash

module
v0.0.0-...-01d6657 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT

README ΒΆ

GoStash

Go Reference License Release Stars

GoStash is a growing library of generic, reusable Go components and utilities for building robust, maintainable applications. It aims to provide well-tested, idiomatic micro-libraries for common tasks, patterns, and concurrency.


✨ Features

  • Generic data structures (stacks, queues, caches)
  • Concurrency helpers (worker pools, reusable writer goroutines)
  • Utility packages (string helpers, validation, adapters)
  • Lightweight integrations (logging, I/O helpers)

πŸš€ Getting Started

Note: GoStash is in early development. APIs and packages may change.

Install (when packages are published):

go get github.com/sracha4355/GoStash@latest

Import a package:

import "github.com/sracha4355/GoStash/pkgname"

πŸ›  Usage Example

Example: Using a generic stack (future API)

import "github.com/sracha4355/GoStash/stack"

stack := stack.New[int]()
stack.Push(42)
val, _ := stack.Pop()
fmt.Println(val) // 42

πŸ—Ί Roadmap

Planned features and packages:

  1. Reusable writer goroutine β€” A well-tested package for concurrent, batched writing with flush semantics and backpressure.
  2. Generic stack/queue implementations
  3. Small string utilities
  4. Example programs demonstrating best practices

Reusable writer goroutine (details):

  • Goal: Provide a drop-in utility for writing to an io.Writer from multiple producers, with batching, flush, graceful shutdown, and error reporting.
  • Why: Many apps need safe, non-blocking I/O from multiple goroutines without flooding the writer or losing data during shutdowns.
  • Acceptance criteria:
    • Supports concurrent Write calls
    • Batches by count or time
    • Applies backpressure or returns error when buffer is full
    • Clean shutdown with flush
    • Unit tests for concurrency, batching, flush-on-close, error handling

🀝 Contributing

Contributions are welcome! If you'd like to help, open an issue to discuss your idea or submit a PR with tests and examples. See the LICENSE for terms.

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

Directories ΒΆ

Path Synopsis
src

Jump to

Keyboard shortcuts

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