{"id":20210772,"url":"https://github.com/bluekeyes/templatetree","last_synced_at":"2026-06-08T16:04:41.054Z","repository":{"id":46781854,"uuid":"140983239","full_name":"bluekeyes/templatetree","owner":"bluekeyes","description":"Simple template inheritance with standard Go templates","archived":false,"fork":false,"pushed_at":"2022-11-08T07:08:12.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-14T00:10:04.995Z","etag":null,"topics":["golang","inheritance","templates"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bluekeyes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-14T22:54:07.000Z","updated_at":"2023-06-03T02:07:29.000Z","dependencies_parsed_at":"2022-08-25T10:30:38.450Z","dependency_job_id":null,"html_url":"https://github.com/bluekeyes/templatetree","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/bluekeyes/templatetree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluekeyes%2Ftemplatetree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluekeyes%2Ftemplatetree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluekeyes%2Ftemplatetree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluekeyes%2Ftemplatetree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluekeyes","download_url":"https://codeload.github.com/bluekeyes/templatetree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluekeyes%2Ftemplatetree/sbom","scorecard":{"id":244565,"data":{"date":"2025-08-11","repo":{"name":"github.com/bluekeyes/templatetree","commit":"2d75840349ee77ab365bb42ae5030eafd6dfc5ef"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/bluekeyes/templatetree/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/bluekeyes/templatetree/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/bluekeyes/templatetree/go.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T07:19:58.157Z","repository_id":46781854,"created_at":"2025-08-17T07:19:58.157Z","updated_at":"2025-08-17T07:19:58.157Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34069500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","inheritance","templates"],"created_at":"2024-11-14T05:49:25.274Z","updated_at":"2026-06-08T16:04:41.038Z","avatar_url":"https://github.com/bluekeyes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# templatetree [![Go Reference](https://pkg.go.dev/badge/github.com/bluekeyes/templatetree.svg)](https://pkg.go.dev/github.com/bluekeyes/templatetree)\n\ntemplatetree is a standard library template loader that creates simple template\ninheritance trees. Base templates use the `block` or `template` directives to\ndefine sections that are overridden or provided by child templates.\n\nCompatible with both `text/template` and `html/template`.\n\n## Example\n\nGiven a `templates` directory with the following content:\n\n**templates/page.html.tmpl**\n\n    \u003chtml\u003e\n      \u003chead\u003e\n        \u003ctitle\u003e{{block \"title\" .}}{{end}}\u003c/title\u003e\n      \u003c/head\u003e\n      \u003cbody\u003e\n      {{block \"body\" .}}{{end}}\n      \u003c/body\u003e\n    \u003c/html\u003e\n\n**templates/index.html.tmpl**\n\n    {{/* templatetree:extends page.html.tmpl */}}\n    {{define \"title\"}}{{.Animal}} Status{{end}}\n    {{define \"body\"}}\n      \u003cp\u003eThe time is {{now}}\u003c/p\u003e\n      \u003cp\u003eThe {{.Animal}} is {{.Status}}\u003c/p\u003e\n    {{end}}\n\n\nUse `Parse` to load and render the templates:\n\n```go\npackage main\n\nimport (\n\thtml \"html/template\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/bluekeyes/templatetree\"\n)\n\nfunc main() {\n\tfactory := func(name string) templatetree.Template[*html.Template] {\n\t\treturn template.New(name).Funcs(template.FuncMap{\n\t\t\t\"now\": func() string {\n\t\t\t\treturn time.Now().Format(time.RFC3339)\n\t\t\t},\n\t\t})\n\t}\n\n\tt, err := templatetree.Parse(\"templates\", \"*.html.tmpl\", factory)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tvar data struct {\n\t\tAnimal string\n\t\tStatus string\n\t}\n\tdata.Animal = \"Walrus\"\n\tdata.Status = \"Forlorn\"\n\n\tif err := t.ExecuteTemplate(os.Stdout, \"index.html.tmpl\", \u0026data); err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n\nOutput:\n\n    \u003chtml\u003e\n      \u003chead\u003e\n        \u003ctitle\u003eWalrus Status\u003c/title\u003e\n      \u003c/head\u003e\n      \u003cbody\u003e\n        \u003cp\u003eThe time is 2018-07-14T21:45:21.230-07:00\u003c/p\u003e\n        \u003cp\u003eThe Walrus is Forlorn\u003c/p\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e\n\nYou can also load templates from a `fs.FS` using `templatetree.ParseFS` or\nfrom memory using `templatetree.ParseFiles`. See the package documentation\nfor details and an example.\n\n## Stability\n\nBeta, API changes possible. v0.4.0 redesigned and simplified the API based on\nexperience with previous versions. v0.5.0 inclued another API break to use\ngenerics, but is functionally the same as the previous version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluekeyes%2Ftemplatetree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluekeyes%2Ftemplatetree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluekeyes%2Ftemplatetree/lists"}