modelgen
modelgen OPTIONS ACTION [MODEL_NAME] [OUT_NAME]
modelgen is a demonstration of the models package for Go. It can read a model expressed as YAML and transform the result into an HTML web form or SQLite3 database schema.
MODEL_NAME is the name of the YAML file to read. If no filename is provided then the model is read from standard input.
OUT_NAME is the name of the file to write. If it is loft off then then standard out is used.
An action can be “model”, “html” or “sqlite”. Actions result in a file or content generation rendering a model.
In this example we create a new model YAML file interactively using the “model” action. Then create an HTML page followed by SQL file holding the SQL schema for SQLite 3.
modelgen model guestbook.yaml
modelgen html guestbook.yaml guestbook.html
modelgen sqlite guestbook.yaml guestbook.sql