Automic VaultAutomic Vault

brew

Installer goimports avec Homebrew

Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de goimports pour les workflows d'agents IA.

installation

Commandes d'installation supplémentaires

macOS

Homebrewvérifié · 100%
brew install goimports

local Homebrew formula metadata

aperçu

Résumé du paquet

Go formatter that additionally inserts import statements

Commandes et alias

  • goimports

historique

Historique du projet et usages

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.

Historique du projet

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.

Historique d'adoption

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.

Modes d'utilisation

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.

Pourquoi les passionnés de paquets s'y intéressent

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.

Chronologie

  • 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.

posture de sécurité

Aucune couverture d'outil protégé trouvée pour le moment

Aucun manifest local de gestion des secrets correspondant n'a été trouvé pour goimports. Les métadonnées de paquet Nucleus restent publiées ici afin que la couverture future dispose d'une URL stable.

Comportement d'installation

  • Aucun hook post-install Homebrew n’est enregistré dans les métadonnées de formule.
  • Les métadonnées de bottle Homebrew sont disponibles pour 6 plateformes.
  • S’installe avec 1 dépendances d’exécution.

Revue recommandée

Avant une utilisation sans surveillance par un agent, vérifiez si l'outil lit des identifiants en clair, écrit un état distant, publie des artefacts ou lance des plugins.

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

exécutables

Exécutables installés

CommandeTypeExpositionNote
goimportscliexécutable global

fraîcheur

Version et fraîcheur

Ces signaux séparent l'âge de génération de la page, l'activité du gestionnaire de paquets et la comparaison avec les versions amont. Un retard de version n'est signalé que lorsqu'une URL de preuve et des versions comparables sont présentes.

page générée2026-07-10
version du gestionnaire0.48.0
gestionnaire mis à jour2026-07-09
données localesOK
amontà jour
dernière version détectéev0.48.0

https://github.com/golang/tools

  • OKAucun avertissement de fraîcheur n'a été généré.

métadonnées d'installation

Métadonnées du paquet

Clé du paquetbrew:goimports
Version0.48.0
Gestionnaire de paquetsHomebrew
Page du gestionnaire de paquetshttps://formulae.brew.sh/formula/goimports
Page d'accueilhttps://pkg.go.dev/golang.org/x/tools/cmd/goimports
Dépôthttps://github.com/golang/tools
Docs amonthttps://github.com/golang/tools/tree/master/cmd/goimports
LicenceBSD-3-Clause
Archive sourcehttps://github.com/golang/tools/archive/refs/tags/v0.48.0.tar.gz
Dernière mise à jour2026-07-09T08:38:20Z
Pulseupdated
Dépendancesgo
Bouteilledisponible (sur arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
post-install Homebrewnon défini
Serviceaucun déclaré

faits du registre

Détails de la base source

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

piste source

Généré depuis les données du dépôt

Cette page est servie par av-web depuis l'artéfact SQLite privé des paquets généré par scripts/generate-pkg-sqlite.py.

Sources utilisées

  • 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