chore: fix go formatting for test files (#931)

This commit is contained in:
0xYYBB | ZYY | Bobo
2025-11-12 15:33:43 +08:00
committed by GitHub
parent 076e8bc1c1
commit f4c95c0aae
2 changed files with 9 additions and 9 deletions

View File

@@ -29,7 +29,7 @@ func TestPromptManager_LoadTemplates(t *testing.T) {
{ {
name: "加载多个模板文件", name: "加载多个模板文件",
setupFiles: map[string]string{ setupFiles: map[string]string{
"default.txt": "默认策略", "default.txt": "默认策略",
"conservative.txt": "保守策略", "conservative.txt": "保守策略",
"aggressive.txt": "激进策略", "aggressive.txt": "激进策略",
}, },
@@ -130,15 +130,15 @@ func TestPromptManager_GetTemplate(t *testing.T) {
} }
tests := []struct { tests := []struct {
name string name string
templateName string templateName string
expectError bool expectError bool
expectedContent string expectedContent string
}{ }{
{ {
name: "获取存在的模板", name: "获取存在的模板",
templateName: "default", templateName: "default",
expectError: false, expectError: false,
expectedContent: "默认策略内容", expectedContent: "默认策略内容",
}, },
{ {
@@ -225,7 +225,7 @@ func TestPromptManager_ReloadTemplates(t *testing.T) {
func TestPromptManager_GetAllTemplateNames(t *testing.T) { func TestPromptManager_GetAllTemplateNames(t *testing.T) {
pm := NewPromptManager() pm := NewPromptManager()
pm.templates = map[string]*PromptTemplate{ pm.templates = map[string]*PromptTemplate{
"default": {Name: "default", Content: "默认策略"}, "default": {Name: "default", Content: "默认策略"},
"conservative": {Name: "conservative", Content: "保守策略"}, "conservative": {Name: "conservative", Content: "保守策略"},
"aggressive": {Name: "aggressive", Content: "激进策略"}, "aggressive": {Name: "aggressive", Content: "激进策略"},
} }

View File

@@ -123,7 +123,7 @@ func TestGetSzDecimals_ValidMeta(t *testing.T) {
} }
tests := []struct { tests := []struct {
coin string coin string
expectedDecimals int expectedDecimals int
}{ }{
{"BTC", 5}, {"BTC", 5},