Commit 3c276a1
authored
fix: readFile on windows (works cross-platform) (#1)
Using path instead of filepath fixes an issue on Windows where the
template files could not be found. I tested these changes on macOS and
Windows and they worked for me.
## Relevant docs:
### https://pkg.go.dev/embed
```
...
The path separator is a forward slash, even on Windows systems.
...
```
### https://pkg.go.dev/path/filepath
```
The filepath package uses either forward slashes or backslashes, depending on the operating system. To process paths such as URLs that always use forward slashes regardless of the operating system, see the [path](https://pkg.go.dev/path) package.
```1 parent 5a67d4d commit 3c276a1
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments