https://github.com/goph/fw
⚠ [ARCHIVED] A simple, unbiased application framework with sane defaults
https://github.com/goph/fw
application-framework defaults go golang
Last synced: 22 days ago
JSON representation
⚠ [ARCHIVED] A simple, unbiased application framework with sane defaults
- Host: GitHub
- URL: https://github.com/goph/fw
- Owner: goph
- License: mit
- Archived: true
- Created: 2017-09-30T14:22:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-11T17:41:39.000Z (over 8 years ago)
- Last Synced: 2024-06-20T10:06:18.645Z (over 1 year ago)
- Topics: application-framework, defaults, go, golang
- Language: Go
- Homepage:
- Size: 84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Fw
[](https://travis-ci.org/goph/fw)
[](https://goreportcard.com/report/github.com/goph/fw)
[](https://godoc.org/github.com/goph/fw)
**A simple, unbiased application framework with sane defaults.**
`fw` is a simple application framework for Go. Unlike most of the other
frameworks, this one is not coupled to a single transport layer (HTTP, gRPC),
in fact it does not make any assumptions about your application.
It can be a daemon, a simple cron job, or an HTTP server, nearly anything.
On the other hand, it's bit opinionated in terms of some
common application components:
- [go-kit](https://github.com/go-kit/kit/tree/master/log) is used for logging
- [emperror](https://github.com/goph/emperror) is used for error handling
- [opentracing](http://opentracing.io/) is used for application traces
That said, using these components in your application is optional.
## Installation
Since this library uses [Glide](http://glide.sh/) I recommend using it in your
project as well.
```bash
$ glide get github.com/goph/fw
```
## Usage
```go
package main
import "github.com/goph/fw"
func main() {
app := fw.NewApplication()
defer app.Close()
// your app logic
}
```
You can also take a look at some [boilerplate](https://github.com/deshboard/boilerplate-service)
code which relies on this framework.
## History
When I first started to work with Go I was amazed by the standard library.
(Almost) Everything I needed was already there. Of course not all of the tools
were perfect, so I had to pull in some external libraries (logging, error handling, etc),
but there was no need for any frameworks or complex configuration to build my applications.
Soon I realized that this "no framework" philosophy requires a lot of copy-pasting.
So I created [boilerplates](https://github.com/deshboard/boilerplate-service) to
make copying easier. But it just didn't feel right either. It became clear
that maintaining 5-6 applications still requires too much time.
So I went back to the table and came up with this library. Although it **is** a
framework, I tried to build it in a way that supports easy extension. One could
even just copy the whole thing.
Using this library one can avoid copying a lot of (unmodified) code.
Furthermore, unlike the linked boilerplates the components in this library
are fully tested.
## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.