Automic VaultAutomic Vault

brew

使用 Homebrew, Nix, pacman 安装 gofumpt

查看 gofumpt 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install gofumpt

local Homebrew formula metadata

Linux

Nix已验证 · 92%
nix profile install nixpkgs#gofumpt

nixpkgs package indexes · pkgs/by-name/go/gofumpt/package.nix · 来源: api.github.com

Arch Linux pacman已验证 · 92%
sudo pacman -S gofumpt

Arch Linux sync databases · gofumpt · 来源: geo.mirror.pkgbuild.com

概览

软件包摘要

Stricter gofmt

命令和别名

  • gofumpt

历史

项目历史与用法

gofumpt is a stricter Go formatter that remains compatible with gofmt output. It accepts a narrower formatting style and can be used as a drop-in command for formatting Go source.

The project occupies a practical niche between the Go toolchain's conservative formatter and teams that want more consistent source layout without maintaining custom formatter rules.

项目历史

The repository began in March 2019 by importing source from cmd/gofmt and adding the first stricter formatting rules. The README continues to describe the tool as a fork of gofmt with added rules implemented in the format package.

The first release, v0.1.0 in January 2021, documented the features that had worked for more than a year. Later releases track Go formatter changes: v0.3.0 was based on Go 1.18's gofmt, v0.5.0 vendored Go formatting packages for stable behavior across build toolchains, and v0.10.0 was based on Go 1.26's gofmt.

采用历史

gofumpt spread through Go editor and CI workflows because it preserves gofmt compatibility while reducing formatting latitude. Its README presents it as a drop-in formatter, and the changelog notes that gopls supports gofumpt natively.

Package-manager adoption followed that formatter role: the input package facts list Homebrew, Nix, and pacman names, reflecting use across developer workstations rather than as a service dependency.

使用方式

The common command-line pattern is gofumpt -l -w . for listing and rewriting formatted files. The README documents skipped vendor and testdata directories unless passed explicitly, and generated files only receive added rules when passed explicitly.

Teams usually run gofumpt in pre-commit hooks, CI checks, or editor format-on-save paths. Library users can also call the format package when they need gofumpt behavior inside Go tooling.

为什么软件包爱好者会关心

gofumpt is package-nerd catnip because it is deliberately boring: it extends gofmt without rejecting gofmt's social contract. That made it acceptable in environments where arbitrary style formatters would be too divisive.

Its release history tracks Go's own formatter internals, so package maintainers care about which Go release a gofumpt version is based on. The vendoring change in v0.5.0 is especially important because it made output less dependent on the compiler used to build the binary.

时间线

  • 2019: Repository starts with cmd/gofmt source and first stricter formatting rules.
  • 2021: v0.1.0 documents the first released rule set and deprecates gofumports.
  • 2022: v0.3.0 bases the formatter on Go 1.18's gofmt and adds concurrency-related speedups.
  • 2023: v0.5.0 vendors Go formatting packages for stable formatter output.
  • 2026: v0.10.0 bases the formatter on Go 1.26's gofmt and adds rule selection for extra rules.

Related projects

  • gofmt is the upstream formatter model and source base.
  • gopls, the Go language server, provides editor integration that can apply gofumpt behavior.
  • goimports is related in editor workflows because it formats Go code while managing imports.

安全态势

尚未找到受保护工具覆盖

没有找到 gofumpt 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布,以便未来覆盖拥有稳定的软件包 URL。

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 1 个运行时依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
gofumptcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-10
管理器版本0.10.0
管理器更新时间2026-05-12
本地数据OK
上游当前
检测到的最新版本v0.10.0

https://github.com/mvdan/gofumpt

  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键brew:gofumpt
版本0.10.0
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/gofumpt
主页https://github.com/mvdan/gofumpt
仓库https://github.com/mvdan/gofumpt
上游文档https://github.com/mvdan/gofumpt#readme
许可证BSD-3-Clause
源码归档https://github.com/mvdan/gofumpt/archive/refs/tags/v0.10.0.tar.gz
最后更新2026-05-12T18:14:29Z
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 Namegofumpt
Version Scheme0
Revision1
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

gofumpt

nix profile install nixpkgs#gofumpt
  • normalized package name match
  • 匹配方式:Gofumpt
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/go/gofumpt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
pacman95%

gofumpt 0.7.0-2

A strict formatter for Go language

https://github.com/mvdan/gofumpt

sudo pacman -S gofumpt
  • License: BSD-3-Clause
  • Architecture: x86_64
  • normalized package name match
  • 匹配方式:Gofumpt
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: gofumpt from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment