https://github.com/theckman/fatinterfaces
A collection of Go interfaces that are a bit on the fat side
https://github.com/theckman/fatinterfaces
Last synced: 2 months ago
JSON representation
A collection of Go interfaces that are a bit on the fat side
- Host: GitHub
- URL: https://github.com/theckman/fatinterfaces
- Owner: theckman
- License: unlicense
- Created: 2017-11-24T08:17:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-24T10:12:50.000Z (over 7 years ago)
- Last Synced: 2025-01-24T15:12:47.356Z (4 months ago)
- Language: Go
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fat Interfaces
[](https://github.com/theckman/fatinterfaces/blob/master/LICENSE)
[](https://godoc.org/github.com/theckman/fatinterfaces)
[](https://github.com/theckman/fatinterfaces/releases)
[](https://travis-ci.org/theckman/fatinterfaces/branches)Package fatinterfaces is a utility package to make it easier to consume common
types as interfaces.This is to make it easier to provide mocked types for testing, or to replace the
functionality of your application without needing to update a bunch of
references.This package defines a set of fat interfaces (interfaces with lots of methods)
that describes things like `*os.File` and `*net/http.Request`.## License
This package is released to the Public Domain using The Unlicense. This allows
you to either import this package, or copy the code directly, without needing to
worry about licensing or attribution. Please see
the [LICENSE](https://github.com/theckman/fatinterfaces/blob/master/LICENSE)
file for more details.While not required by the license, the only request is that any useful changes
be contributed back so others can make use of them.## Usage
The purpose of this package is to allow you to replace references to things like
`*os.File` with an interface. In this example it would be something like
`fatinterfaces.OsFile`.This would allow you to either use something like `*os.File`, or to use
something like Afero.Please see the [GoDoc page](https://godoc.org/github.com/theckman/fatinterfaces)
for an idea of other supported interfaces.