refactor: add cache folder on init
This commit is contained in:
6
main.go
6
main.go
@@ -2,10 +2,14 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
_, err := os.Stat("./.cache")
|
||||||
|
if err != nil {
|
||||||
|
os.Mkdir("./.cache", 0700)
|
||||||
|
}
|
||||||
http.HandleFunc("/", RequestHandler)
|
http.HandleFunc("/", RequestHandler)
|
||||||
http.ListenAndServe(":3333", nil)
|
http.ListenAndServe(":3333", nil)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user