Discover Packages
github.com/Super-Gagaga/AbstractManager
tests
testutil
package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Aug 19, 2026
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package testutil provides shared test fixtures and helpers for AbstractManager tests.
SeedRedis populates Redis with the given key→JSON-string map.
SetupMiniRedis spins up an in-memory miniredis and returns a go-redis client.
type NestedContainer struct {
User struct {
ID uint `json:"id"`
Name string `json:"name"`
} `json:"user"`
}
NestedContainer holds a nested struct for nested-field extraction tests.
type Product struct {
ID uint `json:"id"`
Category string `json:"category"`
Name string `json:"name"`
Price float64 `json:"price"`
}
Product is a test model for multi-field key template tests.
type TestUser struct {
ID uint `gorm:"primaryKey" json:"id"`
Username string `gorm:"uniqueIndex;size:64" json:"username"`
Email string `json:"email"`
Age int `json:"age"`
Status string `json:"status"`
}
TestUser mirrors the example User model for use in tests.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.