remove unnecessary import
This commit is contained in:
parent
b298451c1f
commit
555b83d5de
2
go.mod
2
go.mod
|
@ -1,3 +1,3 @@
|
|||
module git.gutmet.org/simpleserver.git
|
||||
|
||||
require git.gutmet.org/goutil.git v0.0.0-20181208191316-76ae04a2662a
|
||||
go 1.14
|
||||
|
|
|
@ -2,7 +2,7 @@ package simpleserver
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"git.gutmet.org/goutil.git"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
|
@ -20,8 +20,8 @@ func viewHandler(root string, w http.ResponseWriter, r *http.Request) {
|
|||
file = filepath.Join(file, "index.html")
|
||||
}
|
||||
fmt.Println("GET " + file)
|
||||
content, _ := goutil.ReadFile(file)
|
||||
fmt.Fprint(w, content)
|
||||
content, _ := ioutil.ReadFile(file)
|
||||
fmt.Fprint(w, string(content))
|
||||
}
|
||||
|
||||
func Serve(root string) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user