all repos — website @ d2a1791fa01fcf4316f80fdc3be241f2c6fd4ac9

My website

build: open templates as read-only
Alan Pearce alan@alanpearce.eu
Wed, 24 Apr 2024 18:00:51 +0200
commit

d2a1791fa01fcf4316f80fdc3be241f2c6fd4ac9

parent

88a94774ce383fb46707af199b957cf8b5dedc39

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M cmd/build/template.gocmd/build/template.go
@@ -29,7 +29,7 @@ ) 
 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
 		}