{"id":29828922,"url":"https://github.com/miyamo2/tagcase","last_synced_at":"2025-07-29T08:14:36.256Z","repository":{"id":302095512,"uuid":"1007630968","full_name":"miyamo2/tagcase","owner":"miyamo2","description":"Checking and standardizing  the case conventions used in naming Go struct tags.","archived":false,"fork":false,"pushed_at":"2025-07-06T06:13:32.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-25T13:51:51.686Z","etag":null,"topics":["cobra","cobra-cli","customizable","formatter","go","go-vet","golang","golangci-lint","linter","static-analysis","staticanalysis","struct-tags","vet"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miyamo2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-24T09:38:20.000Z","updated_at":"2025-07-06T06:13:35.000Z","dependencies_parsed_at":"2025-06-30T15:35:03.081Z","dependency_job_id":null,"html_url":"https://github.com/miyamo2/tagcase","commit_stats":null,"previous_names":["miyamo2/tagcase"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/miyamo2/tagcase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyamo2%2Ftagcase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyamo2%2Ftagcase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyamo2%2Ftagcase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyamo2%2Ftagcase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyamo2","download_url":"https://codeload.github.com/miyamo2/tagcase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyamo2%2Ftagcase/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267652824,"owners_count":24122099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cobra","cobra-cli","customizable","formatter","go","go-vet","golang","golangci-lint","linter","static-analysis","staticanalysis","struct-tags","vet"],"created_at":"2025-07-29T08:14:35.531Z","updated_at":"2025-07-29T08:14:36.246Z","avatar_url":"https://github.com/miyamo2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tagcase - the Go struct tag formatter/linter/analyzer\n\n[![GitHub stars](https://img.shields.io/github/stars/miyamo2/tagcase)](https://github.com/miyamo2/tagcase/stargazers)\n[![Go Reference](https://pkg.go.dev/badge/github.com/miyamo2/tagcase.svg)](https://pkg.go.dev/github.com/miyamo2/tagcase)\n[![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/miyamo2/tagcase)](https://img.shields.io/github/go-mod/go-version/miyamo2/tagcase)\n[![Go Report Card](https://goreportcard.com/badge/github.com/miyamo2/tagcase)](https://goreportcard.com/report/github.com/miyamo2/tagcase)\n[![Release](https://github.com/miyamo2/tagcase/actions/workflows/release.yaml/badge.svg)](https://github.com/miyamo2/tagcase/actions/workflows/release.yaml)\n[![Version](https://img.shields.io/github/v/release/miyamo2/tagcase)](https://github.com/miyamo2/tagcase/releases)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/miyamo2/tagcase)\n[![GitMCP](https://img.shields.io/endpoint?url=https://gitmcp.io/badge/miyamo2/tagcase)](https://gitmcp.io/miyamo2/tagcase)\n\n## Table of Contents\n\n- [🎯 What is tagcase?](#-what-is-tagcase)\n- [✨ Key Features](#-key-features)\n- [⏳ Quick Start](#-quick-start)\n  - [▶️ Standalone CLI](#-standalone-cli)\n    - [Installation](#installation)\n    - [Usage](#usage)\n  - [🔎 Analyzer](#-analyzer)\n    - [Installation](#installation-1)\n    - [Usage](#usage-1)\n- [⚙️ Configuration](#-configuration)\n- [🧗 Advance](#-advance)\n  - [golangci-lint Integration](#golangci-lint-integration)\n- [🤝 Contributing](#-contributing)\n- [📄 License](#-license)\n\n## 🎯 What is tagcase?\n\ntagcase makes struct tags naming consistent throughout your Go project. Whether you are working with JSON APIs, databases, configurations, or anything else.\n\n```yaml\n# yaml-language-server: $schema=https://raw.githubusercontent.com/miyamo2/tagcase/main/schema.json\ntags:\n  json:\n    case: snake_case\n  dynamodbav:\n    case: camelCase\n```\n\n```sh\ntagcase -w path/to/file.go\n```\n\n```diff\ntype User struct {\n-    ID       int    `json:\"user_id\" dynamodbav:\"UserID\"`\n-    Name     string `json:\"userName\" dynamodbav:\"user_name\"`  \n-    Email    string `json:\"Email\" dynamodbav:\"email\"`\n+    ID       int    `json:\"user_id\" dynamodbav:\"userID\"`\n+    Name     string `json:\"user_name\" dynamodbav:\"userName\"`\n+    Email    string `json:\"email\" dynamodbav:\"email\"`\n}\n```\n\n## ✨ Key Features\n\n- 6 Case Formats\n- Flexible configuration\n- `golangci-lint` Plugin support\n- `go vet` Analyzer\n\n## ⏳ Quick Start\n\n### ▶️ Standalone CLI\n\n#### Installation\n\n```bash\n# Go\ngo install github.com/miyamo2/tagcase@latest\n\n# Homebrew\nbrew install miyamo2/tap/tagcase\n```\n\n#### Usage\n\n```sh\n# Check files for tag inconsistencies (shows diff)\ntagcase -d path/to/file.go\n\n# Fix formatting issues automatically\ntagcase -w path/to/file.go\n\n# Initialize configuration file\ntagcase --init\n```\n\n### 🔎 Analyzer\n\n#### Installation\n\n```sh\n# Go\ngo install github.com/miyamo2/tagcase/cmd/tagcase-analyzer@latest\n\n# Homebrew\nbrew install miyamo2/tap/tagcase-analyzer\n```\n\n#### Usage\n\n```sh\n# Run analyzer on your Go project\ngo vet -vettool=$(which tagcase-analyzer) ./...\n```\n\n## ⚙️ Configuration\n\nCreate a `.tagcase.yaml` file to customize rules for your project:\n\n```yaml\n# yaml-language-server: $schema=https://raw.githubusercontent.com/miyamo2/tagcase/main/schema.json\n# Specify case conventions for different tag types\ntags:\n  json:\n    # Supported cases: snake_case, camelCase, PascalCase, kebab-case, SNAKE_CASE, KEBAB-CASE\n    case: snake_case\n  db: \n    case: snake_case\n  yaml:\n    case: camelCase\n  xml:\n    case: PascalCase\n# Custom initialism handling\ninitialism:\n  enable:\n    - API\n    - UUID\n  disable:\n    - ID\n```\n\n## 🧗 Advance\n\n### golangci-lint Integration\n\n1. Add `.custom-gcl.yml` to your project root\n\n```yaml\nversion: v2.2.0\nplugins:\n  - module: 'github.com/miyamo2/tagcase'\n    import: 'github.com/miyamo2/tagcase/pkg/golangci-lint/plugin'\n    version: latest\n```\n\n2. Build the custom golangci-lint\n\n```sh\ngolangci-lint custom\n```\n\n3. Add tagcase to your `.golangci.yaml`:\n\n```yaml\nversion: \"2\"\nlinters:\n  settings:\n    custom:\n      tagcase:\n        type: \"module\"\n        settings:\n          tags:\n            db:\n              case: snake_case\n```\n\n4. Run the custom golangci-lint\n\n```sh\n./custom-gcl run ./...\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! tagcase is built by the community, for the community.\n\n- 🐛 [Report bugs](https://github.com/miyamo2/tagcase/issues)\n- 💭 [Request features](https://github.com/miyamo2/tagcase/issues)\n- 🔀 [Submit pull requests](https://github.com/miyamo2/tagcase/compare)\n- 💬 Share with others\n- ⭐ Star the repo if you find it useful!\n\n## 📄 License\n\ntagcase is released under the [MIT License](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyamo2%2Ftagcase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyamo2%2Ftagcase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyamo2%2Ftagcase/lists"}