File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ alternate form using matching
104
104
105
105
For some reason you want to list the files in a directory and embed them in a file in a custom format:
106
106
107
- ``` gotemplate
107
+ ``` template
108
108
{{- $files := fileGlob "./*/*" -}}
109
109
{{- range $path := $files }}
110
110
{{- $stat := fileStat $path }}
@@ -113,6 +113,16 @@ For some reason you want to list the files in a directory and embed them in a fi
113
113
{{ printf "%-12s" $stat.Mode }}{{ printf $usernameFString $username }}{{ pathAbsolute $path}}
114
114
{{- end }}
115
115
```
116
+ ```
117
+ -rw-rw-rw- adam C:\Users\adam\code\yet-unnamed-template-cli\.git\COMMIT_EDITMSG
118
+ -rw-rw-rw- adam C:\Users\adam\code\yet-unnamed-template-cli\.git\FETCH_HEAD
119
+ -rw-rw-rw- adam C:\Users\adam\code\yet-unnamed-template-cli\.git\HEAD
120
+ -rw-rw-rw- adam C:\Users\adam\code\yet-unnamed-template-cli\.git\ORIG_HEAD
121
+ -rw-rw-rw- adam C:\Users\adam\code\yet-unnamed-template-cli\.git\config
122
+ -rw-rw-rw- adam C:\Users\adam\code\yet-unnamed-template-cli\.git\description
123
+ drwxrwxrwx adam C:\Users\adam\code\yet-unnamed-template-cli\.git\hooks
124
+ ........
125
+ ```
116
126
### Merging 2 data files and applying them to a template
117
127
118
128
``` pwsh
You can’t perform that action at this time.
0 commit comments