{"id":13771761,"url":"https://github.com/sourcegraph/go-template-lint","last_synced_at":"2025-05-11T04:30:54.699Z","repository":{"id":23062033,"uuid":"26415446","full_name":"sourcegraph/go-template-lint","owner":"sourcegraph","description":"Linter for Go text/template (and html/template) template files","archived":false,"fork":false,"pushed_at":"2024-06-01T23:25:10.000Z","size":6,"stargazers_count":44,"open_issues_count":2,"forks_count":4,"subscribers_count":83,"default_branch":"master","last_synced_at":"2025-05-04T04:39:22.446Z","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/sourcegraph.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}},"created_at":"2014-11-10T01:09:49.000Z","updated_at":"2025-04-04T04:40:30.000Z","dependencies_parsed_at":"2024-08-03T17:15:04.720Z","dependency_job_id":null,"html_url":"https://github.com/sourcegraph/go-template-lint","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fgo-template-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fgo-template-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fgo-template-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fgo-template-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcegraph","download_url":"https://codeload.github.com/sourcegraph/go-template-lint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253518941,"owners_count":21921074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-08-03T17:00:55.213Z","updated_at":"2025-05-11T04:30:54.093Z","avatar_url":"https://github.com/sourcegraph.png","language":"Go","funding_links":[],"categories":["Linters"],"sub_categories":["Misc"],"readme":"# go-template-lint\n\n`go-template-lint` is a linter for Go\n[text/template](http://golang.org/pkg/text/template/) (and\nhtml/template) template files.\n\n\n## Checks\n\n* unused template functions (e.g., your `FuncMap` defines `f` but none\n  of your templates call it)\n\n\n## Usage\n\n```\ngo get sourcegraph.com/sourcegraph/go-template-lint\ngo-template-lint -f=\u003cfile-with-FuncMap.go\u003e -t=\u003cfile-with-template-[][]string-list\u003e -td=\u003cbase-template-dir\u003e\n```\n\nThe `file-with-FuncMap.go` option should be a Go source file that\ncontains a `FuncMap` literal, such as:\n\n```\npackage foo\n\nimport \"text/template\" // html/template and/or other import aliases are also detected\n\n// ...\n// can be nested in any block\n  template.FuncMap{\n    \"f\": myFunc,\n    \"g\": func(v string) string { /* ... */ },\n  }\n// ...\n```\n\nThe `file-with-template-[][]string-list.go` option should be a Go\nsource file that contains a list of top-level templates and other\ntemplate files (relative to the Go file) to include, such as:\n\n```\npackage foo\n\n// ...\n// can be nested in any block\n  [][]string{\n    {\"profile.html\", \"common.html\", \"layout.html\"},\n    {\"edit.html\", \"common.html\", \"layout.html\"},\n  }\n// ...\n```\n\nThe `base-template-dir` should be the directory that contains your Go\ntemplates and that the template filenames in your code are relative\nto. For example, if the template files above (profile,html,\ncommon.html, etc.) were stored in `app/templates`, we'd use\n`-td=app/templates`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcegraph%2Fgo-template-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcegraph%2Fgo-template-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcegraph%2Fgo-template-lint/lists"}