mirror of
https://github.com/kevin-DL/gothstarter.git
synced 2026-01-11 18:14:27 +00:00
initial
This commit is contained in:
16
static_dev.go
Normal file
16
static_dev.go
Normal file
@@ -0,0 +1,16 @@
|
||||
//+build dev
|
||||
//go:build dev
|
||||
// +build dev
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
func public() http.Handler {
|
||||
fmt.Println("building static files for development")
|
||||
return http.StripPrefix("/public/", http.FileServerFS(os.DirFS("public")))
|
||||
}
|
||||
Reference in New Issue
Block a user