Automic VaultAutomic Vault

brew

goimports を Homebrew でインストール

goimports のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

インストール

追加のインストールコマンド

macOS

Homebrew確認済み · 100%
brew install goimports

local Homebrew formula metadata

概要

パッケージ概要

Go formatter that additionally inserts import statements

コマンドとエイリアス

  • goimports

履歴

プロジェクトの歴史と使われ方

goimports is a Go formatter command that also adds missing imports and removes unused imports. It is part of golang.org/x/tools, the official Go supplementary tools repository.

The command became one of the canonical editor-save tools in Go development because it turns source formatting and import maintenance into one operation.

プロジェクトの歴史

The cmd/goimports documentation carries a 2013 Go Authors copyright notice, and repository history records goimports moving into go.tools in December 2013. Soon after, the README was renamed to doc.go, making the command documentation part of the source package.

The implementation evolved alongside Go tooling: repository history shows work on package lookup, standard-library handling, cgo exports, vendor directory support, and module-era behavior. The command remains documented through both its source directory and pkg.go.dev.

採用の歴史

goimports was adopted through editors as much as through terminals. The official command docs include examples for Emacs and Vim, telling users to make goimports their format-on-save command.

Because it lives in x/tools rather than the core go command, goimports is a classic package-manager/editor dependency: small binary, official upstream, and installed wherever developers want import organization without manually editing import blocks.

使われ方

The documented install path uses go install for golang.org/x/tools/cmd/goimports. In use, it formats code like gofmt and rewrites imports based on symbols in the file.

goimports respects $GOPATH/src/.goimportsignore, a line-oriented ignore file for directories that should not be scanned when resolving packages under GOPATH. That file is the only official fixed config-file location documented by the command.

パッケージ好きにとっての重要性

goimports matters because it is the bridge between Go's no-bikeshedding formatting culture and the messier reality of import discovery. It made save hooks feel magical without requiring a full IDE.

For packagers, it is an example of an official subcommand distributed from a larger module. The package name is the command, but the upstream repository and release cadence are tied to golang.org/x/tools.

タイムライン

  • 2013: goimports moves into go.tools and command documentation becomes doc.go.
  • 2014: Repository history records import lookup, standard-library, cgo, and golang.org/x path work.
  • 2016: Vendor directory support lands in the imports package.
  • 2016: .goimportsignore support is added for excluding GOPATH directories from scans.
  • 2026: x/tools history continues to update imports behavior for module cache and tooling changes.

Related projects

  • gofmt is the formatter behavior goimports preserves while adding import management.
  • golang.org/x/tools is the official repository that contains cmd/goimports and the imports package.
  • gopls overlaps with goimports in editor workflows by providing language-server driven formatting and import organization.

セキュリティ状態

保護ツール対応はまだ見つかっていません

goimports に一致するローカルシークレット処理マニフェストは見つかりませんでした。将来の対応で安定したパッケージ URL を使えるよう、Nucleus パッケージメタデータはここに公開されています。

インストール挙動

  • formula メタデータに Homebrew post-install フックは記録されていません。
  • Homebrew bottle メタデータは 6 個のプラットフォームターゲットで利用できます。
  • 1 件の実行時依存関係とともにインストールされます。

推奨レビュー

エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
$GOPATH/src/.goimportsignore

実行可能ファイル

インストールされる実行可能ファイル

コマンド種類公開範囲メモ
goimportscliグローバル実行可能ファイル

鮮度

バージョンと鮮度

これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。

ページ生成日2026-07-10
マネージャ版0.48.0
マネージャ更新日2026-07-09
ローカルデータOK
上流最新
検出された最新v0.48.0

https://github.com/golang/tools

  • OK鮮度警告は生成されていません。

インストールメタデータ

パッケージメタデータ

パッケージキーbrew:goimports
バージョン0.48.0
パッケージマネージャHomebrew
パッケージマネージャページhttps://formulae.brew.sh/formula/goimports
ホームページhttps://pkg.go.dev/golang.org/x/tools/cmd/goimports
リポジトリhttps://github.com/golang/tools
上流ドキュメントhttps://github.com/golang/tools/tree/master/cmd/goimports
ライセンスBSD-3-Clause
ソースアーカイブhttps://github.com/golang/tools/archive/refs/tags/v0.48.0.tar.gz
最終更新2026-07-09T08:38:20Z
Pulseupdated
依存関係go
Bottle利用可能 (対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定義
サービス宣言なし

レジストリ情報

ソースデータベース詳細

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namegoimports
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

ソース経路

リポジトリデータから生成

このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。

使用ソース

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • package relationship graph
  • package version freshness
  • package-page enrichment