From 9d2633911ac21e771395760e68422fc5982363e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Luka=C5=A1=C3=ADk?= Date: Sat, 5 Sep 2020 13:00:23 +0200 Subject: [PATCH] Refactor: Rename template to generated_models.tmpl This template is used to generate generated_models.go. Let's name it based on that. --- metaschema/template/{types.tmpl => generated_models.tmpl} | 0 metaschema/template/pkged.go | 2 +- metaschema/template/template.go | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename metaschema/template/{types.tmpl => generated_models.tmpl} (100%) diff --git a/metaschema/template/types.tmpl b/metaschema/template/generated_models.tmpl similarity index 100% rename from metaschema/template/types.tmpl rename to metaschema/template/generated_models.tmpl diff --git a/metaschema/template/pkged.go b/metaschema/template/pkged.go index 6d9a57d..f641965 100644 --- a/metaschema/template/pkged.go +++ b/metaschema/template/pkged.go @@ -9,4 +9,4 @@ import ( "github.com/markbates/pkger/pkging/mem" ) -var _ = pkger.Apply(mem.UnmarshalEmbed([]byte(`1f8b08000000000000ffec59dd72e238b07e952ddd1e36fe018798aabd002601670833810483a7a6a6645bd88a65c96bc9043395773f25db18c3909fadd93a37672f12ba5bed96faebaf5b26f909305d330e7a3f81fcf98453d0034ac862a470924590e3e8cf755b577c28a092223f844209b050c2cc5502e6b13821b9122301b917a2188216b0e284a5e22b1421e801d002531823d003473e9f98572e3ec03440a294678c55d21d145e087a3423a405e60212047a6b4838aab419829cd1d277c46e30417cef5dee5eab9f5052cb0f888b136f693a79e28ef999dcef27a85208b00833f7c263f12b09df414c414fa4196afd1bf88dd81df37f2b8812b08b98f945ac054a392eb0d22eb43678797969817509c1cf7752eb35430a1427040aa4883c41fc42c40991112479e4a78f04c4a4084acb7a37fc5a80e31d023d5dd5cd1688998f40afd3be2cc41f0217eebaaaab7faae69f6ae741d77a6dad67742e3add4bd5d4bae6d5ffa87a4f55410b60fec397085764e079b1e327b401bdcb4eb7abb5804519e8758d2bb37da5b5c094601a819e569415815ebbadab9d1678c43ee869aaaab6c0e8202e7ffc48a0af829eda02335fc6545b60de38f9804465221dd5bc942af3220e7a572dd01738962799230ff434c334f54e57bf6cb7c0944b8b71d56e77db86aabeb4c0dd195753ebec5deb9c5f5a60f871d7e58f1f19cd38f241ef9bda525beaf7a2d2214aff8dae3e4784d34e7f9b4baf44a86643c3f2d664f8adb6aa66ca377001bed743a56cdae399c2a5f6878f12447d44bdbcf7c7c7534b60ca51da9c4adfeae42e022677aec7cd37e0e60271d002284d592a85752c40eb1f20596fd778248669e44281b8924441b9c894354b63286363a66096092c9b92c92d132842450e0429c84e1529a6815c11682b0eb5fabe9fa5df809bad3103adfaf8f28829e25c595735ac0dc10e27854e05c414a50ac15c5406b42da4344f04ab050596114bc5c349586450e97e73d1e7f0a020ef58f575c3d0cc5f0c0aa602a5141205f9cf30f5f9a91b213811d83b58c21836b4faf11452bf42f1748967ae20e8b010fbc64191cf3534afd3509a09f0106a479a6e5c1ee986a637f4932d0569e0b43554f3585392086f25eda8c77c4c8386a8404eb5a6ee428e2e3b47164c619a372d216a46539e641b35f404c54d751b937728ef66eb35244c09518a7ebb1d30a41e23288654e122f52047efb6cbab8b674e74ea51d32086097fdb35898212fc777d142efca25903a6c0a2819a2d1db046e24c49d2e20ca5c23d48e95e112c42b23221e461f5a178a9d7964caacf2d9b1a92a069f292aca9ae63c1592a9a268a8448a1879a36c68b1a374d0923a4a99f3e92a235419e20581c9939a601416b8283f068579e730f12a2a02df210dd9c5bca68c1f4da2e10178415d9b19369589ae3720aca0fc5c5c141147c2f573d1ccbf796f24389332270020b500ac3df1913c82f4a01dda2352912e56f2514226988c5af3d7ab5717fe2ca26a76592b262524a3d4beb01ce78014035cacf4cf40ad5420ad036a90585e75440894f9a5151a653498a17b08656e307058b8bf1f8cb4a05dc2f76f98ad60215616407b2a252876b86e7d4ab3e0ee1abfad5b710749f535cb2faf85a3ad1cb4e90d6329d8c624fbef8d5929289b57679ac5f152a876be9b741d467a91230026970c1d240d92afbeb28845e0875f5635e0923b9d6568d77bc8b0fd9741ff5db8fe8b79cb37483f657db1b7e61e4afdff6f8f5567bc3f99d8c256f7dcae54f8c3887c16be18e3a23c88ace7bd72f49d9367fc75157c2047ad11b5ed8a7f095659ef36a129e5b2d58c89197a54871b18fd3ec55b44ac2a6907239c2df72da735406fc881f95f1befff745b7fca25b0d44995f147c24bdeacbc87bdf7a5f5a401e0ff4c024bf0aee753372e603ead806f1e21bd5b1ef83158d02389ea9def8ee72929b142e67ccb7ad6ca59b62a2fa9b7bdd14de686b4c748df8a39bdd4a0f896b5f77adebd957ebdaf8ba180e6e66d7e47112245d94cf9e57f6345dd93e79886f8433ef5f7e9df7b3996ede9fd8c57aa97ef646374f50bfa1ce7cd045793faaf5472374edc740fa0ca9e83afa429ddbdab3dbbe55bdbc9fededb72335f8f2a406135cc6436d91af6c833a72cfd12286b641ee97d39d636bd81d13737dcf026b78b5b1c6a26b0d8db1ab4e37aead1197de177bf963f25c9ec518bbdaccf0468b2f2b5b23eba51a78ed59eedb53d51af3cfd670d0453a89ada131779683dc594e894b67bbc7d8dcf8d70bee34625ac3c1eae1715bc4b1c6a1708746298f061dd77ebeb4e250f5c77d89fd93d7be7d9ac446e2b5ef334737f5896eec26bab95be9377cb2bbceee86054e5989e1c05ccfad00d2e9c67d627832bf0d86b81fa03617d668913963cd94184de6830326f13674dad3777128f2cbd500daab60651b91350c8937ef6368df63ab3affe7799f39cbebc0a283dcd59dc41d3d626b785aff0af36b1259e3a9eac52473f24180461aff826f9f57cbdbd09d6b8933dc86fe78964f46a680cb1971970315357283f63d77752df1470be18d678615f7eb333af676e72c35b3ca5d72adae59a55faf96b3b0a8ed52336bdc25362414eeb5e4dac25ccfdf3e838c35977254fb6f5c9ba88ead3dfbe308affa2c90784ee603e2c633737d9f54e733a21ad3923353579f11775c9eb9cce350a307db8c1cfb399bc584b8a359552be9d7df4cf2b2fe33ddfce4ea9a706c43b5ea38fd72ffc8df14d8cb5cf7babd100fa31bc36d2fd4f5523bcbef95e4e6a722cfe0804bd183c7d8e3c1df9e6e665ff0ad8cf359cafbfd8eb12bf978a8538943d3e6c53799a33f069348db38a3059f44373b4f5f8855bc354acccabce4ec2ace1595f3c8b517993f1c34b0a97a56ddd766af6bc47ddc86c836357fac99151f1ed172406a8c5ee7c3517dad51b273f54ee91749d9d86377869bfd132eb0cfafe73c65ae4e9e1a1c16d6f83674639f58436304ed0577aa1abf89c3bf53fbcc1e69fc7c3d7fa717cee5ff4baddfe4f72bbd3d756ced6eb5241b7f3933d7cb32e785ecf5c79a0bfb7923735fb9f6f67cddfe21af8fe66cf04bbe855e739e1677538dc5b97beab8df5f9fcda8cd237728efd50177ec4e30891cbeb2fd9d35d4ea9923e7b6d3be0f6e47cfc1ddb0bc1bffd1dd7654a732fe6fd4e8ff74fe3ac57da5ed3967afecade6cc073b7f7c9bb8b157737d329ab2d5f23692676bd45e2ffd4f6327fbbb94b8e32939bd232711d93dd837396c2f9ef7581cf0ee1fcf9ce2deee9bd6b5167ab1d0bc66af8ca7e463cfd7f97c3e9daf25cfee83c9b2bcff0f1c14ddc65cb976960557891b4f136779f7eefbcfd7fa2c0bf5c15ea8abe5f4098e16623597be8370a58bd0d117d57b8e664ee8995e94fcd4179953ccacbffe2afe0090222a0e2fbe87575bb0ffa700faef7f7dff1fbe02bdfc2f000000ffff010000ffff0b7ad237de1d0000`))) +var _ = pkger.Apply(mem.UnmarshalEmbed([]byte(`1f8b08000000000000ffec595f73daba12ff2a67f47a39f11f708899390f4013704a68030906773a1dd916b66259f2b16482e9e4bbdf916d8ca12469a767eecb3d0f897757abd5ee6fffc84ebe034cd78c83de77207f3ee014f48012b218299c6411e438fa73ddd6151f0aa8a4c80fa150022c9430739580792c4e48aec44840ee852886a005ac3861a9f80c45087a00b4c014c608f4c091ce07e6958b0f300d9028e919631575078517821ecd086981b9800481de1a128e2a6e862067b4d41db11b4c10df6b97a7d7ec0794d4f403e2e2445b8a4e76dc313f93e77d075508011661e65e782c7e25e03b8829e8893443ad7f02bf11bb63fe6f195102761133bfb0b54029c70556da85d6062f2f2f2db02e21f8fe4e68bda64981e2844081940051944281fc6f31f311e117224e883426eb483e7d242026857d5aa6fefc9616e07887404f5775b305e40ae875da9705f94de062a7aeeaea9faaf9a7da79d0b55e5beb199d8b4ef75235b5ae79f51f55efa92a6801ccbff912f7aa44785e1cfe016d40efb2d3ed6a2d6051067a5de3ca6c5f692d30259846a0a715c946a0d76eeb6aa7051eb10f7a9aaaaa2d303a90cb6fdf12e8aba0a7b6c0cc9736d51698373c1f90a80ca4a39a9792655ec441efaa05fa02c7d29339f2404f334cb3adb60dadd302532e25971d4d37f44ef7eaa505ee4e55f54ed73ca8d631bfb4c0f09c55d5dcabb6f52b899ada7e297ccf68c6910f7a5fd496da52bf16f90f51fa4ff4fab9f238edffb72bec150bd5c46848de9a17bfd56cd5a4f9022ec0d77ad494ad7c3c69b8e4fef05182a88fa897f7fef8f9d0129872943667d5973ab88b80c993eb21f405b8b9401cb4004a53964a621d0bd0fa0524ebe31a5b6298462e14882b4914948b4c59b33486d236660a6699c0b229993c32812254e4989084ec5491621ac81581b6e290abaffb09fb05b8d91a33d0aadd972ea68873655de5b016043b9c143c151053942a04735109d0b6a0d23c11ac2614585a2c190f27611141c5fbcd459fc30383bc63d6d70d43337f1028980a94524814e43fc3d4e7a76a84e04460ef200963d8e0eaed29a47e85e2e912cf5c41d06121f68d0323f73538afd3609a01f0106a479c6e5c1ef186a637f893230569e0b43554f3985392086f65d9518ff998060d52819c6a4dde851c5d768e2498c2346f4a42d4b4a63cc9366af0098a9bec3626ef94bc9badd79030254429faed76c0907a8ca01852858bd4831cbddb2eaf2e9ef1e854a32e831826fc6dd5240a4af0dfd551b8f08b660d98028b066ab674c01a813325490b1f4a867b90d23d235884646642c8c3eaa178a9d7969554fb2d9b1a92a029f292acc9ae63c1592a9a228a8448a1879a32c68b1c37450923a4c99f6e49d19a204f102c8ec41cd380a035c14178742acfb9070951d01679886ece2d65b4a8f45a2e10178415d1b19369588ae3720aca87e2e2e0400abea7ab1e8ee57b4bf950e28c089cc0029442f077c604f28b5440b7684d8a44f95b0985481a64f16b8f5e2ddc7b5cc9e4b44c52564c4ac967693dc0192f00a846f999895ea15a5001da2635a1f09c0a28f149332aca702a4af102d6e06afca06071311e7f58a980fb412e5fd15aa02a18d981acc8d4e19ae139f5aac7c17c95bffa1682ee738acbaa3ebe964ef8b213a4b40c27a3d8932f7e35a56462ad5d1ef35705cbe15aea6d10f559aa048c401a5cb03450b6cafe3a0aa117425dfd39ad84915c6babc63bdac54336ddcfeaed47f45bca59ba41fbabed0dbd30f2d76f6bfc78abbda1fc4ec4b26e7dcae54f8c3887c16be68e3a23c88ace7b572f49d9367f475157c2047ad11b5ad8a7f095659ef36a129e5b2daa90232f4b91e2621fa7d9ab6895059b42cae5087f4b695fa3d2e0cfe85169efebbf9fbfe5e76f3510657c51f033e1551f23bff02dfcd202d253d00393fc2ab8d7cdc8990fa8631bc48b6f54c7be0f56340ae078a67ae3bbcb496e52b89c31dfb6b2956e8a89ea6fee755378a3ad31d135e28f6e762b3d24ae7dddb5ae679fad6be3f36238b8995d93c7499074513e7b5ed9d37465fbe421be11cebc7ff979decf66ba797f2217eba5fad11bdd3c41fd863af34117e5fda8e61f8dd0b51f03a933a4a2ebe80b756e6bcf6efb56f5f27eb697df8ed4e0d3931a4c70690fb545beb20deac833478b18da06b95f4e778ead61774cccf53d0bace1d5c61a8bae3534c6ae3addb8b6465c7a5f9ce58fc973e98b3176b599e18d169f56b646d64b35f0dab3dcb7a7aa35e61fade1a08b74125b4363ee2c07b9b39c1297ce768fb1b9f1af17dc69d8b48683d5c3e3b6b0638d43e10e8d921e0d3aaefd7c69c5a1ea8ffb12fb27af7dfb34898dc46bdf678e6eea13ddd84d7473b7d26ff864779ddd0d0b9cb212c381b99e5b01a4d38dfbc4f0647e1b0c713f406d2eacd12273c69a29319acc07074ce26de8b4a7efe250c497ab01b457c1ca36226b18126fdec7d0bec756e5ffc7799f39cbebc0a283dcd59dc41d3d626b789aff0af36b1259e3a9eac52473f24180461aff846f9f57cbdbd09d6b8933dc86fe78964f46a680cb1971970315356283f63d77752df1470be18d678615f76b1f1d7bbb73969a59c52e6badce59c55faf96b3b0c8ed52336bdc25362414eeb5acb585b99ebfed83b435977454eb6f5c9ba88ead3dfbe308affa2c90784ee603e2c633737d9f54fe19518d69593353579f11775cfa5cc671c8d1836d468efd9ccd6242dcd1acca95d4eb6f267999ff996e7e70754d38b6a15ab59d7e797ee46f0aec65ac7bde5e8887d18de1b617ea7aa99dadef95accd0f459cc10197a2078fb1c783bf3dddcc3ee15b69e7a3a4f7e71d6357d6e3214f250e4d9917df648efe184c226de38c167c12ddec3c7d2156f1d628312be392b3abf02b2ae7916b2f327f38686053f5acbacfcd9ed788fbb80d916d6afe5833ab7a7844cb01a9317abd1e8ef26b8d929dab774abd48d2c61ebb33b5d93fa905f6f1f598a7ccd5c953a3868535be0dddd827d6d018417bc19d2ac76fe2f0cfe43eb3471a3f9fcfdfe98573f1ff90eb37ebfb95de9e3ab676b75a928dbf9c99eb6519f342f6fa635d0bfb7923635fb9f6f67cde7eb1ae8fe66cf043bc055fd73c2deea61a8b73f7d471bfbf3e9b519b47ee50deab03eed89d6012397c65fb3b6ba8d53347ce6da77d1fdc8e9e83bb617937fed2dd7694a7d2fe6fe4e87f3a7f9de2bed2f63567afecade6cc073b7f7c9bb8b157d7fa643465abe56d247d6be45e2ff54f6d27fbbb94b8e32939bd232711d93dd837396c2f9ef7581cf0ee1fcf9ce2deee9bd6b5167ab1d0bc66af8ca7e4e7f6d7f17c3c9daf659ddd07936579ff1f6a50741b73e5da5916b54adc789a38cbbb77df7f3ed7be2cd4077ba1ae96d327385a88d55cea0ec2952e42475f54ef399a39a1677a51d6a7bec89c6266fdf557f1b78014517178073ebce582fdff07d0bfff0cfc7ff81a7af92f000000ffff010000ffffc2d438b1ff1d0000`))) diff --git a/metaschema/template/template.go b/metaschema/template/template.go index 7ce7337..ff38b2a 100644 --- a/metaschema/template/template.go +++ b/metaschema/template/template.go @@ -67,7 +67,7 @@ func newTemplate(outputDir string) (*template.Template, error) { return imports.String() } - in, err := pkger.Open("/metaschema/template/types.tmpl") + in, err := pkger.Open("/metaschema/template/generated_models.tmpl") if err != nil { return nil, err } @@ -78,7 +78,7 @@ func newTemplate(outputDir string) (*template.Template, error) { return nil, err } - return template.New("types.tmpl").Funcs(template.FuncMap{ + return template.New("generated_models.tmpl").Funcs(template.FuncMap{ "getImports": getImports, }).Parse(string(tempText)) }