# 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

```sh
sudo av install brew:goimports
```

Commandes d'installation supplémentaires:

### macOS

- Homebrew (100%):

```sh
brew install goimports
```

  Preuve: local Homebrew formula metadata

## Faits du paquet

- **Clé du paquet:** brew:goimports
- **Gestionnaire de paquets:** Homebrew
- **Page du gestionnaire de paquets:** <https://formulae.brew.sh/formula/goimports>
- **Version:** 0.48.0
- **Résumé source:** Go formatter that additionally inserts import statements
- **Page d'accueil:** <https://pkg.go.dev/golang.org/x/tools/cmd/goimports>
- **Dépôt:** <https://github.com/golang/tools>
- **Docs amont:** <https://pkg.go.dev/golang.org/x/tools/cmd/goimports>
- **Licence:** BSD-3-Clause
- **Archive source:** <https://github.com/golang/tools/archive/refs/tags/v0.48.0.tar.gz>
- **Dernière mise à jour:** 2026-07-25T20:55:24-04:00
- **Généré:** 2026-08-04T22:13:35+00:00

## exécutables

- goimports (cli)
- goimports (alias)

## Dépendances

- go

## Comportement d'installation

- hook post-installation: non défini
- Bouteille: disponible sur arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Version et fraîcheur

- page générée: 2026-08-04
- version du gestionnaire: 0.48.0
- gestionnaire mis à jour: 2026-07-25
- données locales: OK
- dépôt amont: https://github.com/golang/tools
- dernière version détectée: v0.48.0 (à jour)
## 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.

### Sources

- <https://github.com/golang/tools>
- <https://github.com/golang/tools/tree/master/cmd/goimports>
- <https://pkg.go.dev/golang.org/x/tools/cmd/goimports>


## Notes de sécurité

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



## 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

- Unix: $GOPATH/src/.goimportsignore
## Détails de la base source

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** goimports
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable


## Liens liés

- [Terminal utility packages](https://pkg.so/fr/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/fr/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/fr/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/fr/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [go](https://pkg.so/fr/brew/go/) - Runtime dependency declared by Homebrew.
- [gopls](https://pkg.so/fr/brew/gopls/) - Shares the same upstream source repository.
- [gci](https://pkg.so/fr/brew/gci/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, go, imports.
- [shfmt](https://pkg.so/fr/brew/shfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, go.
- [yamlfmt](https://pkg.so/fr/brew/yamlfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, go.
- [delve](https://pkg.so/fr/brew/delve/) - Shares pkgdb curated category or tags: cli, developer-tools, go.
- [gofumpt](https://pkg.so/fr/brew/gofumpt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, go.
- [isort](https://pkg.so/fr/brew/isort/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, imports.
- [chroma](https://pkg.so/fr/brew/chroma/) - Shares pkgdb curated category or tags: cli, developer-tools, go.
- [leaf](https://pkg.so/fr/brew/leaf/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, go.
- [pkgsite](https://pkg.so/fr/brew/pkgsite/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, go.

## Combined YAML source

View the package source record on GitHub. [combined/goimports.yml](https://github.com/mxcl/pkgdb/blob/main/combined/goimports.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
