about summary refs log tree commit diff stats
path: root/cmd
diff options
context:
space:
mode:
authorAlan Pearce2024-04-24 18:00:51 +0200
committerAlan Pearce2024-04-24 18:00:51 +0200
commitd2a1791fa01fcf4316f80fdc3be241f2c6fd4ac9 (patch)
tree9768c05493cd63e3d6b9d3d3d03d7412d5996e55 /cmd
parent88a94774ce383fb46707af199b957cf8b5dedc39 (diff)
downloadwebsite-d2a1791fa01fcf4316f80fdc3be241f2c6fd4ac9.tar.lz
website-d2a1791fa01fcf4316f80fdc3be241f2c6fd4ac9.tar.zst
website-d2a1791fa01fcf4316f80fdc3be241f2c6fd4ac9.zip
build: open templates as read-only
Diffstat (limited to 'cmd')
-rw-r--r--cmd/build/template.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/build/template.go b/cmd/build/template.go
index b3576a2..b56b7dd 100644
--- a/cmd/build/template.go
+++ b/cmd/build/template.go
@@ -29,7 +29,7 @@ var (
 
 func loadTemplate(path string) (file *os.File, err error) {
 	if templates[path] == nil {
-		file, err = os.Open(path)
+		file, err = os.OpenFile(path, os.O_RDONLY, 0)
 		if err != nil {
 			return nil, err
 		}