Event Hooks

go-formatter

1 event · 1 hook

From go-formatter
Install
1
Run in your terminal
$
npx claudepluginhub iceleaf916/my-cc-plugins --plugin go-formatter
Risk Indicators
Modifies files
Source

Defined in hooks/hooks.json

Configuration
{
  "PreToolUse": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "jq -r '.tool_input.file_path | select(endswith(\".go\"))' | xargs -r goimports -w",
          "statusMessage": "格式化 Go 代码"
        }
      ],
      "matcher": "Write|Edit|Update"
    }
  ]
}
Summary
{
  "riskFlags": {
    "touchesBash": false,
    "matchAllTools": false,
    "touchesFileWrites": true
  },
  "typeStats": {
    "command": 1
  },
  "eventStats": {
    "PreToolUse": 1
  },
  "originCounts": {
    "absolutePaths": 0,
    "pluginScripts": 0,
    "projectScripts": 0
  },
  "timeoutStats": {
    "commandsWithoutTimeout": 1
  }
}
Stats
Parent Repo Stars5
Parent Repo Forks0
Last CommitJan 22, 2026