macOS
brew install counterfeiterlocal Homebrew formula metadata
安装
brew install counterfeiterlocal Homebrew formula metadata
概览
Tool for generating self-contained, type-safe test doubles in go
历史
counterfeiter is a Go code generator for creating self-contained, type-safe test doubles from interfaces.
The public repository was created in 2014. Its README frames the project around a Go-specific testing problem: fake implementations are useful for unit tests but cannot be generated automatically at runtime in Go.
The project has continued through a v6 release line, with current documentation using Go modules and Go tool dependencies.
counterfeiter's documented workflow follows Go ecosystem conventions: add it as a tool dependency, place `go:generate` or `counterfeiter:generate` directives near interfaces, and regenerate fakes with `go generate`.
The README notes that the project has largely been maintained by the community, which fits its role as a small but durable testing utility rather than a framework-owned generator.
Typical use is to generate fakes for interfaces in the same module or for third-party interfaces, then import the generated `foofakes` package in tests to inspect call counts, arguments, and stubbed return values.
For package maintainers, counterfeiter is a good example of a Go CLI whose preferred installation changed with Go tooling: Homebrew can ship a binary, but the upstream docs now prefer module-pinned tool dependencies for reproducible generation.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
counterfeiter | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/maxbrunsfeld/counterfeiter
安装元数据
| 软件包键 | brew:counterfeiter |
|---|---|
| 版本 | 6.12.2 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/counterfeiter |
| 主页 | https://github.com/maxbrunsfeld/counterfeiter |
| 仓库 | https://github.com/maxbrunsfeld/counterfeiter |
| 上游文档 | https://github.com/maxbrunsfeld/counterfeiter#readme |
| 许可证 | MIT |
| 源码归档 | https://github.com/maxbrunsfeld/counterfeiter/archive/refs/tags/v6.12.2.tar.gz |
| 最后更新 | 2026-06-22T14:03:05-07:00 |
| Pulse | updated |
| 依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | counterfeiter |
| 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 |
|
来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.