frantic-core is a Go utility library and application toolkit.
It includes a large set of helper packages for banking, dates, logging, configuration, financial calculations, and more.
| Package | Description |
|---|---|
| application | OS/platform detection and system identity |
| banking | IBAN, ISIN, LEI, UTI validation and GLEIF API lookup |
| chiMiddleware | Chi router middleware (Brotli, minify, method conversion, context injection) |
| colours | ANSI colour escape sequences for terminal styling |
| commonConfig | TOML-based application configuration |
| commonErrors | Shared sentinel errors and wrapping helpers |
| contextHandler | Request-scoped context and session management |
| dateHelpers | Date formatting, parsing, arithmetic, and business-day logic |
| dockerHelpers | Docker environment detection and payload deployment |
| emailHandler | Email composition and SMTP sending |
| financial | Tenor calculations, settlement dates, and amount formatting |
| frantic | Project identity utilities and validation |
| htmlHelpers | HTML value conversion and URL-safe encoding |
| idHelpers | ID generation (KSUID), hashing, and composite IDs |
| ioHelpers | File I/O, copy, backup, and directory management |
| logHandler | Multi-channel logging with file rotation |
| mathHelpers | Random numbers, min/max, coin toss |
| messageHelpers | Inter-service message types (user, session, authority, translation) |
| mockData | Mock reference datasets for testing (countries, currencies, etc.) |
| netHandler | Network host reachability checking |
| notificationHandler | Push notifications via Pushover |
| paths | Filesystem path helpers and directory structure |
| stringHelpers | String formatting, quoting, encoding, and manipulation |
| timeHelpers | Timezone inference from locale |
| timing | Stopwatch timing and snooze utilities |
| tuiInputHelper | Terminal UI input prompts |
- Banking utilities (IBAN, ISIN, LEI, UTI validation and formatting)
- GLEIF API integration for LEI lookups
- Color terminal output
- Centralized TOML-based configuration management
- Common error handling with sentinel errors and wrappers
- Context and session helpers with worker pool support
- Date and time utilities with business-day awareness
- Docker environment detection
- Email sending via SMTP
- Financial calculations (tenors, settlement dates, rate ladders, amount formatting)
- Project identity validation
- HTML value helpers and URL-safe encoding
- ID generation (KSUID), hashing (SHA3-256), and composite IDs
- File I/O, backup, and directory management
- Multi-channel logging with file rotation (lumberjack)
- Math helpers (random, min/max)
- Inter-service messaging types
- Mock reference data (countries, currencies, genders, titles, rate ladders)
- Network host reachability checks
- Push notifications (Pushover)
- Filesystem path management
- String manipulation and formatting
- Timezone inference
- Stopwatch timing and sleep utilities
- Terminal UI input helpers
- Chi router middleware (Brotli, HTML minification, HTTP method conversion)
application/ # OS/platform detection and system identity
banking/ # Financial identifier validation (IBAN, ISIN, LEI, UTI)
chiMiddleware/ # Chi router middleware
colours/ # ANSI colour escape sequences
commonConfig/ # TOML-based configuration management
commonErrors/ # Shared sentinel errors and wrappers
contextHandler/ # Context and session management
dateHelpers/ # Date utilities and business-day logic
dockerHelpers/ # Docker environment support
emailHandler/ # Email sending via SMTP
financial/ # Financial calculations and tenor logic
frantic/ # Project identity utilities
htmlHelpers/ # HTML value helpers and URL encoding
idHelpers/ # ID generation and hashing
ioHelpers/ # File I/O and directory management
logHandler/ # Multi-channel logging with rotation
mathHelpers/ # Numeric helpers
messageHelpers/ # Inter-service message types
mockData/ # Mock reference datasets
netHandler/ # Network reachability checking
notificationHandler/ # Push notifications (Pushover)
paths/ # Filesystem path helpers
stringHelpers/ # String manipulation
timeHelpers/ # Timezone inference
timing/ # Stopwatch and snooze utilities
tuiInputHelper/ # Terminal UI input helpers
To use frantic-core in your Go project:
go get github.com/mt1976/frantic-coreImport the package or specific modules as needed:
import (
"github.com/mt1976/frantic-core/banking"
"github.com/mt1976/frantic-core/dateHelpers"
"github.com/mt1976/frantic-core/logHandler"
// ...other imports as needed
)package main
import (
"fmt"
"github.com/mt1976/frantic-core/banking"
)
func main() {
iban, err := banking.NewIBAN("GB82WEST12345698765432")
if err != nil {
fmt.Println("Invalid IBAN:", err)
return
}
fmt.Println("IBAN:", iban.String())
}import "github.com/mt1976/frantic-core/logHandler"
func main() {
logHandler.Info.Println("Application started")
}import (
"fmt"
"github.com/mt1976/frantic-core/dateHelpers"
)
func main() {
today := dateHelpers.Today()
fmt.Println("Today:", dateHelpers.FormatHuman(today))
fmt.Println("Is working day:", dateHelpers.IsWorkingDay(today))
}This project is licensed under the MIT License. See the LICENSE file for details.