commit | edbf996a4185611857667e5678300c80942eb3d3 | [log] [tgz] |
---|---|---|
author | M. J. Fromberger <michael.j.fromberger@gmail.com> | Mon Jun 17 09:07:12 2019 -0700 |
committer | M. J. Fromberger <michael.j.fromberger@gmail.com> | Mon Jun 17 09:35:45 2019 -0700 |
tree | fbe4b2e9c316c8c7b4a4adf8f54fdfd693875946 | |
parent | 1d5009535a852da6275efda71aec424051f12f90 [diff] |
Separate generator source into template files. Instead of packing the source templates into string literals, store them as separate files and use go generate to compile the templates into the tool.
http://godoc.org/bitbucket.org/creachadair/stringset
The stringset
package implements a lightweight set-of-strings type based around Go's built-in map type.
The stringset
package is generated by the makeset
program from source templates core.go.in
(the main package source) and core_test.go.in
(for the unit tests). If you need to modify the templates, edit those files and run:
go generate ./makeset
to update the static.go
file. You can then re-generate the stringset
package by running:
go run ./makeset -config makeset/stringset.toml -output .