V4 vs V3 - go-easygen/easygen GitHub Wiki
As planned in issues#23:
I'm planning the following up-coming changes
- will support
.json
data as well as the.yaml
data- most importantly, I'm planning to make none-backward-compatible breaking changes to the
easygen
command line option. The reason is that, the more I useeasygen
, the more cases that I find that I'm using the same template with different driving data. I.e., previously in my mind, the driving data is the most important, but now I realize that the template is more important.So, I'll be changing the
easygen
command line option as follows:easygen [options] template_name [data_filename [data_filename...]]
So,
- If only
template_name
is given, then thedata_filename
will be derived from the template_name. I.e., reverse the current behavior. So for the existing usage ofeasygen filename
, when filename does not specify the extension. It'll still work, without any changes.- for the current usage of
easygen -tf name YamlFileName
(oreasygen -tf name f1 f2 etc
), the new usage will beeasygen name YamlFileName
. I.e., there won't be the-tf
option any more.
Note in the above plan, "the current usage" refers to the V3 behavior, while "the new usage" refers to the planned V4 behavior.
Basically, the change
- is only at external command line option level, except for
- func
Process
, which was using the V3's calling convention and only works properly in V4+ in the case that there is only one fileName passed to it. If need to pass more files, useProcess2()
instead. Check out the Process Example in whichProcess2()
is used right afterProcess()
to give the same result. - other than that,
Process2()
can read.json
data under the hood now.