🐛 Fixed errors caused by structure changes
This commit is contained in:
@@ -172,9 +172,9 @@ func monitoredCacheExample() {
|
|||||||
func compressedCacheExample() {
|
func compressedCacheExample() {
|
||||||
// 创建压缩选项
|
// 创建压缩选项
|
||||||
compressOptions := cache.CompressOptions{
|
compressOptions := cache.CompressOptions{
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
Level: 6,
|
Level: 6,
|
||||||
MinSizeBytes: 100, // 最小压缩大小 (字节)
|
MinSize: 100, // 最小压缩大小 (字节)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建一个带默认缓存和压缩的PixelNebula实例
|
// 创建一个带默认缓存和压缩的PixelNebula实例
|
||||||
|
@@ -23,9 +23,9 @@ func TestPixelNebula(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打印可用的风格和主题数量
|
// 打印可用的风格和主题数量
|
||||||
fmt.Printf("总风格数量: %d\n", pn.themeManager.StyleCount())
|
fmt.Printf("总风格数量: %d\n", pn.ThemeManager.StyleCount())
|
||||||
for i := 0; i < pn.themeManager.StyleCount(); i++ {
|
for i := 0; i < pn.ThemeManager.StyleCount(); i++ {
|
||||||
fmt.Printf("风格 %d 的主题数量: %d\n", i, pn.themeManager.ThemeCount(i))
|
fmt.Printf("风格 %d 的主题数量: %d\n", i, pn.ThemeManager.ThemeCount(i))
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, id := range testIDs {
|
for i, id := range testIDs {
|
||||||
@@ -46,9 +46,9 @@ func TestPixelNebula(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打印调试信息
|
// 打印调试信息
|
||||||
pn.hasher.Reset()
|
pn.Hasher.Reset()
|
||||||
pn.hasher.Write([]byte(id))
|
pn.Hasher.Write([]byte(id))
|
||||||
sum := pn.hasher.Sum(nil)
|
sum := pn.Hasher.Sum(nil)
|
||||||
hashStr := hex.EncodeToString(sum)
|
hashStr := hex.EncodeToString(sum)
|
||||||
|
|
||||||
// 提取数字
|
// 提取数字
|
||||||
@@ -144,7 +144,7 @@ func TestDemo(t *testing.T) {
|
|||||||
pn := NewPixelNebula()
|
pn := NewPixelNebula()
|
||||||
|
|
||||||
// 设置风格和尺寸
|
// 设置风格和尺寸
|
||||||
pn.WithStyle(style.MetaStyle)
|
pn.WithStyle(style.GuyStyle)
|
||||||
pn.WithTheme(1)
|
pn.WithTheme(1)
|
||||||
pn.WithSize(231, 231)
|
pn.WithSize(231, 231)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user