proxy.golang.org : github.com/karelbilek/template-parse-recursive
Package recurparse parsing go templates recursively, instead of default template behavior that puts all files together. It goes through subfolders recursively and parses the files matching the glob. The templates have the subfolder path in the name, separated by forward slash (even on windows). The template names are as relative to the given folder. All the 4 functions behave in similar way. If the first argument is nil, the resulting template will have one of the files as name and content; if it's an existing template, it will add the files as associated templates. The pattern works only on the final filename; that is, k*.html will match foo/bar/kxxx.html; it does NOT filter the directory name, all directories are walked through. The matching logic is using filepath.Match on the filename, in the same way template.Parse do it. It follows all symlinks, the symlinks will be there under the symlink name. If there is a "symlink loop" (that is, symlink to .. or similar), the function will panic and run out of memory. If there is no files that matches, the function errors, same as go's ParseFiles.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/karelbilek/template-parse-recursive
License: BSD-3-Clause
Latest release: over 1 year ago
First release: over 4 years ago
Namespace: github.com/karelbilek
Dependent repositories: 1
Stars: 3 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 26 days ago