took care of linting
This commit is contained in:
parent
59c54ed10a
commit
dfa7a280f0
|
@ -1,13 +1,14 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"time"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
//Post : Is exported
|
||||
type Post struct {
|
||||
Date time.Time
|
||||
Title string
|
||||
|
@ -15,9 +16,9 @@ type Post struct {
|
|||
Content template.HTML
|
||||
}
|
||||
|
||||
var lewd string = "Lewd Interlude"
|
||||
var reveries string = "Takunomi Coffee Reveries, Vol. I"
|
||||
var romantic string = "Romantic Japanese Christmas Takunomi Saturday Recap"
|
||||
var lewd = "Lewd Interlude"
|
||||
var reveries = "Takunomi Coffee Reveries, Vol. I"
|
||||
var romantic = "Romantic Japanese Christmas Takunomi Saturday Recap"
|
||||
|
||||
func spaceToHyphen(s string) string {
|
||||
return strings.Replace(s, " ", "-", -1)
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"net/http"
|
||||
"strings"
|
||||
"os"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
//Page : Is exported to PostCollection
|
||||
type Page struct {
|
||||
Title string
|
||||
MenuItems []string
|
||||
Posts []Post
|
||||
}
|
||||
|
||||
var name string = "takunomi"
|
||||
var name = "takunomi"
|
||||
var posts []Post
|
||||
var sections = []string{"about", "past", "contact"}
|
||||
var templates = template.Must(template.ParseFiles("blog.tmpl", "blog_roll.tmpl", "style.tmpl", "post.tmpl"))
|
||||
|
@ -32,8 +33,6 @@ func main() {
|
|||
http.ListenAndServe(":35291", nil)
|
||||
}
|
||||
|
||||
//http.ListenAndServe(":8080", nil)
|
||||
|
||||
}
|
||||
|
||||
func errorHandler(w http.ResponseWriter, req *http.Request, status int) {
|
||||
|
@ -68,4 +67,3 @@ func renderTemplates (w http.ResponseWriter, p Page) {
|
|||
s3 := templates.Lookup("post.tmpl")
|
||||
s3.ExecuteTemplate(w, "post", nil)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user