carrot / burrow Goto Github PK
View Code? Open in Web Editor NEW:zap: Carrot's base API scaffolding for Go
License: MIT License
:zap: Carrot's base API scaffolding for Go
License: MIT License
throughout building this out - if we find ourselves having multiple administrative CLI tasks, in addition to originator
we may want to explore a common task runner to unify things and keep cognitive overhead low.
https://github.com/go-godo/godo seems to be a strong candidate, but open to other suggestions
Currently it's documented as ErrorDetail
in the README, where as it should be AddErrorDetail
./go-base-api [production | development | staging | test]
Inside of main load .env.[environment]
.env.test
always loads for tests (document it)
Also add:
package environment
type{
PRODUCTION,
TEST,
SOMETINGELSE,
}
Environment env.Get()
env.IsProduction() bool {
env.Get() == env.PRODUCTION
}
https://github.com/rcrowley/go-metrics seems to be the state of the art
We didn't touch endpoints like:
[GET] /people/{id}/pets
[POST] /people/{id}/pets
[DELETE] /people/{id}/pets
We should come up with a strategy to name these controller methods
in sharing the 12factor doc regarding an implementation question earlier - I realized it might be a good meta-issue to create.
gom
is the solutionLooks like we've got a few dependencies, we should either add a dependency manager, or list out our dependencies.
Just to make this easy for developers who aren't familiar with Go, we should write a getting started section.
After we added a custom http error handler we forgot to log the errors, which is super valuable during debugging.
Just have to add fmt.Println(err)
in the custom http error handler.
Describe where to find them, how to set them up etc
The long term goal of this would be to build out a Burrow CLI, but a make file should be sufficient for now
Okay, so we are using some custom recover middleware, which makes me want to bring up the question of whether our default HTTP response code of 500 on the response is even needed.
If we switched this to a 200 and there was an error, wouldn't our middleware catch it and turn it into a 500?
I think this would save us a line in every request at the end from having to set it to 200 (which I find myself sometimes forgetting to do).
Looks like this project assumes you have a local Redis server setup?
Should Redis even be the datastore in this default setup? I'm pretty sure Redis isn't intended to be a primary datastore, so I can't even imagine a use case where we are only using Redis.
Big refactor on develop requires a bunch of changes to the README
we should have a default deployment strategy.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.