From f0d548aa3b40e601fae32f592ac45134ed1ab0da Mon Sep 17 00:00:00 2001 From: Gabriel De Los Rios Date: Sun, 6 Apr 2025 22:12:11 -0300 Subject: [PATCH] refactor: add cache folder on init --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 9e1bc1a..9779248 100644 --- a/main.go +++ b/main.go @@ -2,10 +2,14 @@ package main import ( "net/http" + "os" ) func main() { - + _, err := os.Stat("./.cache") + if err != nil { + os.Mkdir("./.cache", 0700) + } http.HandleFunc("/", RequestHandler) http.ListenAndServe(":3333", nil) }