go-shared

module
v0.0.0-...-d983338 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT

README

Shared Library Project

golangci-lint

This shared library provides various utility functions and structures that can be utilized across different Go projects. The goal of this library is to promote code reuse and to offer a central repository of common code components.

Features

This shared library includes a range of features designed to simplify development across various projects:

  • Logging: A versatile logging package that supports different log levels and output formats.
  • Networking Utilities: Helper functions and structures for common networking tasks, including HTTP and WebSocket communication.
  • Service Discovery: Implementations for mDNS and SSDP service discovery protocols.
  • Command-Line Interface: Utilities to assist in building CLI applications, including version and license commands.
  • Database: Ready-to-use PostgreSQL (via pgx) and SQLite (via modernc.org/sqlite) configurations with functional options.

Each feature is encapsulated in its own module within the library, providing a modular approach to using specific functionalities.

Develop

Ensure the quality of the repository met my standards:

task

Contributing

Contributions are welcome! If you would like to contribute, please:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Make your changes and write any necessary tests.
  4. Ensure that all tests pass.
  5. Submit a pull request to the main repository.

License

This shared library is licensed under the MIT License. See the LICENSE file for more information.

Directories

Path Synopsis
pkg
cmd
Package cmd defines structures and implements functionality required for creating and managing the command-line interface (CLI) of an application.
Package cmd defines structures and implements functionality required for creating and managing the command-line interface (CLI) of an application.
discover
Package discover provides an abstraction for discovering services on a network using different resolver implementations, each one discovering services using different protocols or strategies.
Package discover provides an abstraction for discovering services on a network using different resolver implementations, each one discovering services using different protocols or strategies.
logger
Package logger provides a simplified interface for initializing and configuring a structured logger, specifically built upon the Uber Zap logging library.
Package logger provides a simplified interface for initializing and configuring a structured logger, specifically built upon the Uber Zap logging library.
net/do
Package do provides a customizable HTTP request execution framework allowing for pre-request and post-request hooks.
Package do provides a customizable HTTP request execution framework allowing for pre-request and post-request hooks.
net/rest
Package rest provides a simple and convenient way to make RESTful HTTP requests.
Package rest provides a simple and convenient way to make RESTful HTTP requests.
net/ws
Package ws provides a WebSocket client with basic WebSocket handshake and communication capabilities.
Package ws provides a WebSocket client with basic WebSocket handshake and communication capabilities.
resolvers/mdns
Package mdns provides a simple mDNS resolver which discovers services over the network using multicast DNS.
Package mdns provides a simple mDNS resolver which discovers services over the network using multicast DNS.
resolvers/ssdp
Package ssdp provides a simple SSDP resolver which discovers services over the network using the Simple Service Discovery Protocol (SSDP).
Package ssdp provides a simple SSDP resolver which discovers services over the network using the Simple Service Discovery Protocol (SSDP).
zapadapter
Package zapadapter provides a wrapper around the Zap logging library, allowing to adapt a *zap.Logger to a Logger interface that works with key/value pairs.
Package zapadapter provides a wrapper around the Zap logging library, allowing to adapt a *zap.Logger to a Logger interface that works with key/value pairs.

Jump to

Keyboard shortcuts

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