ch00k / doo Goto Github PK
View Code? Open in Web Editor NEWYet another ToDo app
License: The Unlicense
Yet another ToDo app
License: The Unlicense
$ golangci-lint run
db.go:35:16: Error return value of `db.AutoMigrate` is not checked (errcheck)
db.AutoMigrate(
^
main.go:11:7: Error return value of `r.Run` is not checked (errcheck)
r.Run(fmt.Sprintf("%s:%s", httpHost, httpPort))
^
models_test.go:33:16: Error return value of `json.Unmarshal` is not checked (errcheck)
json.Unmarshal([]byte("{\"CompletedAt\":null}"), &s)
^
models_test.go:39:16: Error return value of `json.Unmarshal` is not checked (errcheck)
json.Unmarshal([]byte("{\"CompletedAt\":123456789}"), &s)
^
router.go:167:48: Error return value of `(*gorm.io/gorm.Association).Delete` is not checked (errcheck)
db.Model(&entry).Association("Tags").Delete(&tag)
^
router_test.go:131:16: Error return value of `json.Unmarshal` is not checked (errcheck)
json.Unmarshal(w.Body.Bytes(), &entry)
^
Get only pending/completed entries, get entries within a time range etc.
While it is not such a big deal in the test setting, panicing is never considered a good practice. Need to replace it with some decent error handling.
Currently we are reusing gorm models for request/response (de)serialization. This often results in suboptimal JSON documents (e.g. circular nesting with entries and tags). Should create dedicated struct for (de)serialization.
PostgreSQL seems like an overkill here. SQLite would be simpler and probably easier to manage.
This will also require authentication.
Having all the examples in readme is nice, but not very practical. Need to figure out how to generate an OpenAPI spec from Gin.
Will be very handy if running this in k8s.
There is currently no error reporting in the API (i.e. we only return a 400/500 and no body). We need to become more verbose in our responses.
router.go
might benefit from some refactoring to remove code duplication etc.
Currently gorm debug logs are enabled by default. Need to make those configurable, and implement better logging on Gin end.
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.