{"id":29151220,"url":"https://github.com/karpeleslab/tpl","last_synced_at":"2026-02-18T09:02:19.790Z","repository":{"id":57507864,"uuid":"234597444","full_name":"KarpelesLab/tpl","owner":"KarpelesLab","description":"Template engine for Go","archived":false,"fork":false,"pushed_at":"2026-01-17T15:34:53.000Z","size":222,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-17T15:35:56.151Z","etag":null,"topics":[],"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/KarpelesLab.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-01-17T17:11:37.000Z","updated_at":"2026-01-17T15:32:18.000Z","dependencies_parsed_at":"2023-11-15T06:23:27.592Z","dependency_job_id":"4379f32c-08e0-4a3c-9b76-ff30822e32ef","html_url":"https://github.com/KarpelesLab/tpl","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/KarpelesLab/tpl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Ftpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Ftpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Ftpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Ftpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KarpelesLab","download_url":"https://codeload.github.com/KarpelesLab/tpl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Ftpl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29574065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-07-01T00:08:54.933Z","updated_at":"2026-02-18T09:02:19.785Z","avatar_url":"https://github.com/KarpelesLab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/KarpelesLab/tpl?status.svg)](https://godoc.org/github.com/KarpelesLab/tpl)\n[![Build Status](https://github.com/KarpelesLab/tpl/actions/workflows/test.yml/badge.svg)](https://github.com/KarpelesLab/tpl/actions/workflows/test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/KarpelesLab/tpl/badge.svg?branch=master)](https://coveralls.io/github/KarpelesLab/tpl?branch=master)\n\n# Template Engine for Go\n\nThis is a legacy template engine system, made to be compatible with an older version initially written in PHP.\n\n## Features\n\n- Template syntax with interpolation and control structures\n- Support for custom filters and functions\n- Parallel template execution\n- Structured error handling with location information\n- Context-aware template execution\n\n## Usage\n\nSee the [SYNTAX.md](SYNTAX.md) file for template syntax documentation.\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\n\t\"github.com/KarpelesLab/tpl\"\n)\n\nfunc main() {\n\t// Create a new template engine\n\tengine := tpl.New()\n\t\n\t// Add a template\n\tengine.Raw.TemplateData[\"main\"] = \"Hello {{_name}}!\"\n\n\t// Set up a context with variables\n\tctx := context.Background()\n\tctx = tpl.ValuesCtx(ctx, map[string]any{\n\t\t\"_name\": \"World\",\n\t})\n\t\n\t// Compile templates\n\tif err := engine.Compile(ctx); err != nil {\n\t\tpanic(err)\n\t}\n\t\n\t// Execute template\n\tresult, err := engine.ParseAndReturn(ctx, \"main\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\t\n\tfmt.Println(result) // Output: Hello World!\n}\n```\n\n## License\n\nThis project is released under the MIT license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarpeleslab%2Ftpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarpeleslab%2Ftpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarpeleslab%2Ftpl/lists"}