2
0

Added automatic .go.erb compilation

fixes #16
This commit is contained in:
Jack Christensen
2013-05-02 09:23:26 -05:00
parent 36e4d74d30
commit 3fef18bf38
8 changed files with 81 additions and 2 deletions
+23
View File
@@ -3,6 +3,29 @@ pgx
Experimental PostgreSQL client library for Go
Usage
=====
TODO
Development
===========
ERB Templating
--------------
Sometimes Go code can be repetitive especially with dealing with functions that only differ in the type (e.g. ReadInt16, ReadInt32, ReadInt64). Some of this repetition can be eliminated by using a template preprocessor. pgx uses Ruby erb templates. Files that end in .go.erb are used to produce the corresponding .go files. These files can be automatically processed with guard -- a Ruby file and directory watcher.
Prerequisites:
* Ruby
* guard
* guard-tilt
To automatically process .go.erb files open a shell in the pgx directory and run:
jack@hk-47~/dev/pgx$ guard
Testing
-------