Remove first dot
This commit is contained in:
parent
d5641e1d4f
commit
0369976212
2
main.go
2
main.go
|
@ -10,7 +10,7 @@ import (
|
||||||
|
|
||||||
func handler(w http.ResponseWriter, r *http.Request) {
|
func handler(w http.ResponseWriter, r *http.Request) {
|
||||||
path := "." + r.URL.Path
|
path := "." + r.URL.Path
|
||||||
fmt.Print(path)
|
fmt.Print(r.URL.Path)
|
||||||
file, err := os.Stat(path)
|
file, err := os.Stat(path)
|
||||||
if err == nil && !file.IsDir() {
|
if err == nil && !file.IsDir() {
|
||||||
// file exists
|
// file exists
|
||||||
|
|
Loading…
Reference in New Issue