From d2a1791fa01fcf4316f80fdc3be241f2c6fd4ac9 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 24 Apr 2024 18:00:51 +0200 Subject: build: open templates as read-only --- cmd/build/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') 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 } -- cgit 1.4.1