Skip to content

Releases: jameycribbs/hare

Tests refactored to pass GoReportCard

25 Feb 00:05
Compare
Choose a tag to compare

I refactored the tests so that GoReportCard would stop complaining regarding gocyclo.

Make gocyclo ignore test functions.

19 Feb 19:35
Compare
Choose a tag to compare

GoReportCard was complaining about Hare's tests. Hare makes extensive use of table-driven tests so it has a lot of anonymous functions within the main test function of a test file. I don't think this is a valid problem of complexity, so I added "gocyclo:ignore" directive to all the test files so that gocyclo would ignore them. I'm not sure if this is kosher or not.

Moved dbadmin examples to separate subdirectories.

16 Feb 15:35
Compare
Choose a tag to compare

The two example files in the examples/dbadmin directory needed to be in their own subdirectory, since they both have a main function.

First public release

15 Feb 17:28
Compare
Choose a tag to compare

A few more tweaks to the readme. I think I'm going to go ahead and publicly announce this, otherwise I would continue to tweak it endlessly.

Cleanup

14 Feb 13:30
Compare
Choose a tag to compare

In an effort to get this ready for it's first public announcement, I've cleaned up various things like the readme, comments, etc. I also renamed the NewRam function to be just New.

Associations (kinda)

13 Feb 17:07
Compare
Choose a tag to compare

The big news in this release is I figured out a way to do a limited type of "belongs_to" association like in Rails. Take a look at the crud.go file in the "examples" directory to see how. This is kind of cool, not only because it is an easy way to populate associations, but is also shows that you can do some creative things in the AfterFind method.

Rename hare_err package to dberr

10 Feb 18:39
Compare
Choose a tag to compare

Golint did not like my package name for hare_err, so I changed it to dberr.

New hare_err package

16 Jan 18:34
Compare
Choose a tag to compare

All of the error variables were moved out of their respective packages and into a new hare_rec package. This was done to de-couple the errors from their respective datastores. For example, before this change, if you had code that did a Find and that record id did not exist, hare could return a disk.NoRecord or a ram.NoRecord, depending upon which back-end datastore you were using.

Now, hare will return a hare_err.NoRecord, no matter which datastore you are using. Not only is this cleaner, but it makes it possible for your code to check for a specific error by doing a call to errors.Is(err, hare_err.ErrNoRecord). This would not have been possible before since you would have had to write errors.Is(err, disk.ErrNoRecord) or errors.Is(err, ram.ErrNoRecord) depending on which datastore you were using.

v0.5.2

15 Jan 20:43
Compare
Choose a tag to compare

I added a go.mod file to the project.

v0.5.1

05 Aug 00:24
Compare
Choose a tag to compare

I have used this release to port over Alex Edward's SnippetBox from MySQL to Hare and it worked surprisingly well. So, I think I am ready for an initial release. I could mess with Hare forever and never release it, but I am anxious to get it out into the wild and get suggestions and feedback from other people.