mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 01:42:12 +08:00
codejen: Update to latest codejen (#58866)
This commit is contained in:
@ -34,12 +34,20 @@ func ForGen(rt *thema.Runtime, decl *kindsys.SomeDecl) (*DeclForGen, error) {
|
||||
type DeclForGen struct {
|
||||
*kindsys.SomeDecl
|
||||
lin thema.Lineage
|
||||
sch thema.Lineage
|
||||
}
|
||||
|
||||
// Lineage returns the [thema.Lineage] for the underlying [kindsys.SomeDecl].
|
||||
func (decl *DeclForGen) Lineage() thema.Lineage {
|
||||
return decl.lin
|
||||
}
|
||||
|
||||
// Schema returns the [thema.Schema] that a jenny should operate against, for those
|
||||
// jennies that target a single schema.
|
||||
func (decl *DeclForGen) Schema() thema.Lineage {
|
||||
return decl.sch
|
||||
}
|
||||
|
||||
// SlashHeaderMapper produces a FileMapper that injects a comment header onto
|
||||
// a [codejen.File] indicating the main generator that produced it (via the provided
|
||||
// maingen, which should be a path) and the jenny or jennies that constructed the
|
||||
|
Reference in New Issue
Block a user