I have problem with adding some CSS to my web app, which is created with go lang. main.go and html file are included to root directory and style.css is included to root/css directory
my .*go code is
package main
import (
"html/template"
"net/http"
)
func main(){
http.HandleFunc("/home", mainViewHandler)
http.ListenAndServe(":8080", nil)
}
func mainViewHandler(responseWriter http.ResponseWriter,request *http.Request){
t, _ := template.ParseFiles("main.html")
t.Execute(responseWriter, 0)
}
and html code is
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="todo/style.css">
<meta charset="UTF-8">
<title>Main Page</title>
</head>
<body>
<h2>Take your choice</h2>
<a href="/edit">Edit</a>
<a href="/add">Add</a>
<a href="/list">List</a>
</body>
</html>