From d8dbdccfcafe7b85d3a6ea74cc23dbd98bc7a2a3 Mon Sep 17 00:00:00 2001 From: o-ga09 Date: Sat, 28 Feb 2026 11:10:08 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=F0=9F=9A=80=20push=E3=82=A4?= =?UTF-8?q?=E3=83=99=E3=83=B3=E3=83=88=E3=81=AB=E3=82=BF=E3=82=B0=E3=81=AE?= =?UTF-8?q?=E3=83=88=E3=83=AA=E3=82=AC=E3=83=BC=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/terraform.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 1988f9f..6c02ed9 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -5,6 +5,9 @@ on: paths: - "terraform/**" - ".github/workflows/terraform.yml" + push: + tags: + - "v*" workflow_dispatch: env: GCP_PROJECT_NUMBER: ${{ secrets.GCP_PROJECT_NUMBER }} From 0361701f5d8b6bff4d3972dd58a603c72d0a43e8 Mon Sep 17 00:00:00 2001 From: o-ga09 Date: Sat, 28 Feb 2026 11:10:21 +0900 Subject: [PATCH 2/2] chore: gofix --- cmd/mcp/main.go | 42 +++++++++++++-------------- internal/database/mysql/db_connect.go | 2 +- internal/database/mysql/sentry.go | 6 ++-- internal/database/mysql/testHelper.go | 4 +-- pkg/testutil/golden.go | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/cmd/mcp/main.go b/cmd/mcp/main.go index e2f71c2..952f04e 100644 --- a/cmd/mcp/main.go +++ b/cmd/mcp/main.go @@ -84,26 +84,26 @@ func (m *MCPServer) AddTools() []server.ServerTool { Description: "Get a list of all monsters with their details", InputSchema: mcp.ToolInputSchema{ Type: "object", - Properties: map[string]interface{}{ - "monster_ids": map[string]interface{}{ + Properties: map[string]any{ + "monster_ids": map[string]any{ "type": "string", "description": "Filter by monster ID (optional, can be a comma-separated list of IDs)", }, - "name": map[string]interface{}{ + "name": map[string]any{ "type": "string", "description": "Filter by monster name (optional, supports partial matches)", }, - "sort": map[string]interface{}{ + "sort": map[string]any{ "type": "string", "description": "Sort order for the results (optional, 'asc' for ascending, 'desc' for descending, default is 'asc')", "enum": []string{"asc", "desc"}, }, - "offset": map[string]interface{}{ + "offset": map[string]any{ "type": "integer", "description": "Offset for pagination (optional, default: 0)", "minimum": 0, }, - "limit": map[string]interface{}{ + "limit": map[string]any{ "type": "integer", "description": "Number of items per page (optional, default: 50)", "minimum": 1, @@ -120,8 +120,8 @@ func (m *MCPServer) AddTools() []server.ServerTool { Description: "Get detailed information about a specific monster by ID", InputSchema: mcp.ToolInputSchema{ Type: "object", - Properties: map[string]interface{}{ - "monster_id": map[string]interface{}{ + Properties: map[string]any{ + "monster_id": map[string]any{ "type": "string", "description": "The unique identifier of the monster", }, @@ -137,22 +137,22 @@ func (m *MCPServer) AddTools() []server.ServerTool { Description: "Search weapons with various filters", InputSchema: mcp.ToolInputSchema{ Type: "object", - Properties: map[string]interface{}{ - "weapon_id": map[string]interface{}{ + Properties: map[string]any{ + "weapon_id": map[string]any{ "type": "string", "description": "Filter by weapon ID (optional)", }, - "name": map[string]interface{}{ + "name": map[string]any{ "type": "string", "description": "Filter by weapon name (optional)", }, - "limit": map[string]interface{}{ + "limit": map[string]any{ "type": "integer", "description": "Number of items to return (optional, default: 50)", "minimum": 1, "maximum": 100, }, - "offset": map[string]interface{}{ + "offset": map[string]any{ "type": "integer", "description": "Number of items to skip (optional, default: 0)", "minimum": 0, @@ -168,7 +168,7 @@ func (m *MCPServer) AddTools() []server.ServerTool { Description: "Get a list of all items", InputSchema: mcp.ToolInputSchema{ Type: "object", - Properties: map[string]interface{}{}, + Properties: map[string]any{}, }, }, Handler: m.getItems, @@ -180,8 +180,8 @@ func (m *MCPServer) AddTools() []server.ServerTool { Description: "Get detailed information about a specific item by ID", InputSchema: mcp.ToolInputSchema{ Type: "object", - Properties: map[string]interface{}{ - "item_id": map[string]interface{}{ + Properties: map[string]any{ + "item_id": map[string]any{ "type": "string", "description": "The unique identifier of the item", }, @@ -197,8 +197,8 @@ func (m *MCPServer) AddTools() []server.ServerTool { Description: "Get items that can be obtained from a specific monster", InputSchema: mcp.ToolInputSchema{ Type: "object", - Properties: map[string]interface{}{ - "monster_id": map[string]interface{}{ + Properties: map[string]any{ + "monster_id": map[string]any{ "type": "string", "description": "The unique identifier of the monster", }, @@ -214,7 +214,7 @@ func (m *MCPServer) AddTools() []server.ServerTool { Description: "Get a list of all skills with their level details", InputSchema: mcp.ToolInputSchema{ Type: "object", - Properties: map[string]interface{}{}, + Properties: map[string]any{}, }, }, Handler: m.getSkills, @@ -225,8 +225,8 @@ func (m *MCPServer) AddTools() []server.ServerTool { Description: "Get detailed information about a specific skill by ID", InputSchema: mcp.ToolInputSchema{ Type: "object", - Properties: map[string]interface{}{ - "skill_id": map[string]interface{}{ + Properties: map[string]any{ + "skill_id": map[string]any{ "type": "string", "description": "The unique identifier of the skill", }, diff --git a/internal/database/mysql/db_connect.go b/internal/database/mysql/db_connect.go index 5f155be..f897239 100644 --- a/internal/database/mysql/db_connect.go +++ b/internal/database/mysql/db_connect.go @@ -60,7 +60,7 @@ func New(ctx context.Context) context.Context { func connect(ctx context.Context, dialector gorm.Dialector) context.Context { var err error - for i := 0; i < MAX_RETRY; i++ { + for i := range MAX_RETRY { if db, err = gorm.Open(dialector, &gorm.Config{ NamingStrategy: schema.NamingStrategy{ SingularTable: false, diff --git a/internal/database/mysql/sentry.go b/internal/database/mysql/sentry.go index 72204bd..ef19857 100644 --- a/internal/database/mysql/sentry.go +++ b/internal/database/mysql/sentry.go @@ -31,19 +31,19 @@ func (l *SentryLogger) LogMode(level logger.LogLevel) logger.Interface { return &newlogger } -func (l *SentryLogger) Info(ctx context.Context, msg string, data ...interface{}) { +func (l *SentryLogger) Info(ctx context.Context, msg string, data ...any) { if l.logLevel >= logger.Info { slog.Log(ctx, constant.SeverityInfo, fmt.Sprintf(msg, data...)) } } -func (l *SentryLogger) Warn(ctx context.Context, msg string, data ...interface{}) { +func (l *SentryLogger) Warn(ctx context.Context, msg string, data ...any) { if l.logLevel >= logger.Warn { slog.Log(ctx, constant.SeverityWarn, fmt.Sprintf(msg, data...)) } } -func (l *SentryLogger) Error(ctx context.Context, msg string, data ...interface{}) { +func (l *SentryLogger) Error(ctx context.Context, msg string, data ...any) { if l.logLevel >= logger.Error { slog.Log(ctx, constant.SeverityError, fmt.Sprintf(msg, data...)) } diff --git a/internal/database/mysql/testHelper.go b/internal/database/mysql/testHelper.go index c1b0a18..826a872 100644 --- a/internal/database/mysql/testHelper.go +++ b/internal/database/mysql/testHelper.go @@ -70,9 +70,9 @@ func migrationTestData() { log.Fatal(err) } // テーブルのクリーンアップ - statements := strings.Split(string(truncateSQL), ";") + statements := strings.SplitSeq(string(truncateSQL), ";") // テーブルのクリーンアップ - for _, stmt := range statements { + for stmt := range statements { // 空の文を除外 if strings.TrimSpace(stmt) != "" { if err := testDB.Exec(stmt).Error; err != nil { diff --git a/pkg/testutil/golden.go b/pkg/testutil/golden.go index d0b5413..2917ad7 100644 --- a/pkg/testutil/golden.go +++ b/pkg/testutil/golden.go @@ -30,7 +30,7 @@ func AssertGoldenJSON(t *testing.T, goldenFile string, actual []byte) { require.NoError(t, err) // JSON形式に整形して比較 - var expectedJSON, actualJSON interface{} + var expectedJSON, actualJSON any err = json.Unmarshal(expected, &expectedJSON) require.NoError(t, err)