This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ( | |
| "html/template" | |
| "net/http" | |
| "path/filepath" | |
| "strings" | |
| "io/ioutil" | |
| "github.com/russross/blackfriday" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "html/template" | |
| "net/http" | |
| "path/filepath" | |
| "strings" | |
| "io/ioutil" | |
| "github.com/russross/blackfriday" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First post! | |
| 4th December 2013 | |
| This is the summary. | |
| This is the main post! | |
| # Markdown! | |
| *it's* **lovely**! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <body> | |
| <h1>Will's Blog!</h1> | |
| {{range .}} | |
| <a href="/{{.File}}"><h2>{{.Title}} ({{.Date}})</h2></a> | |
| <p>{{.Summary}}</p> | |
| {{end}} | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "html/template" | |
| "net/http" | |
| ) | |
| func handlerequest(w http.ResponseWriter, r *http.Request) { | |
| title := "Hello World!" | |
| t := template.New("index.html") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| ) | |
| func handlerequest(w http.ResponseWriter, r *http.Request) { | |
| fmt.Fprintf(w, "Hi you accessed post %s", r.URL.Path[1:]) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| func main() { | |
| fmt.Printf("Hello World!\n") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <body> | |
| <h1>Will's Blog!</h1> | |
| <p>{{.}}</p> | |
| </body> | |
| </html> |
NewerOlder