Removed the underlying Gorp package as a dependency & replaced with use of the standard database/sql driver.
This removes a dependency and makes this package very lightweight and makes database interactions very transparent. Lastly, from the standpoint of unit testing where you want to mock the database layer instead of requiring a real database, you can now easily use a package like [go-SQLMock](https://github.com/DATA-DOG/go-sqlmock) to do just that.
The tests may/not pass for Golang 1.5; it appears that the problem is Travis need to install a linter.
This is a refactor of parts of the code, some minor things such as adding
punctuation in the end of sentences and making the code a bit easier to read.
More tests has been added in the form of gometalinter which checks the code
health, style and spelling errors. The flaky cleanup test should also be fixed
with this commit.
This commit aims to fix tests which fails on not finding columns such as
`expireson`. Adding the underscore that are used when creating the table
should fix this.
An issue with this is that it must have worked previously without underscores.
In that case this might break existing usage.
This will remove the current .drone.yml which isn't used anymore, update the
Makefile target and move tests to using `t.Skip` instead of `t.Fatal` if no
database exists during tests. This is so it's possible to develop new tests
that may not require a database.
- Call defer store.StopCleanup(store.Cleanup(time.Minute * 5)) after store creation.
- Does not break the existing API (optional, but recommended)
- Based on https://github.com/yosssi/boltstore/reaper
- Deletes expired sessions (where expireson > now())
- Includes tests