Documentation
¶
Overview ¶
Package gensource identifies the Go files a generation run wrote.
Index ¶
Constants ¶
const DefaultPrefix = "Code generated by tinybind"
DefaultPrefix is what every generated file of this module leads with. The suffix varies by artifact ("by tinybind", "by tinybind templates"), so the prefix is what identifies the writer.
Variables ¶
This section is empty.
Functions ¶
func IsGenerated ¶
IsGenerated reports whether file carries a generated header this run owns.
Discovery skips such a file. A generated registry registers the pages of a route tree, so reading it back would discover those pages as routes and put an HTML page and its action endpoints into an OpenAPI document, which is exactly what a page route is not. The same applies to a generated binder or component: nothing the run wrote is an input to what it reads.
extra names further header prefixes, which is how a framework generating with this module declares its own output. A framework that brands its generated files writes a header this package cannot recognize on its own, and an unrecognized generated registry is discovered like hand-written code. Each entry is matched as a prefix of the comment text and still requires the conventional "DO NOT EDIT." ending.
Another tool's generated code is deliberately not skipped by default. Its registrations are a user's own API surface, and dropping them would remove routes from a document with nothing said about it.
Types ¶
This section is empty.