Skip to content

Commit

Permalink
Go Implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavtripathy committed Dec 15, 2019
1 parent 82ed054 commit 6e20e12
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions auth-server-go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module auth-server

go 1.13
10 changes: 10 additions & 0 deletions auth-server-go/server.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package (
"fmt"
"net/http"
)

func viewHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/view/"):]
p, _ := loadPage(title)
fmt.Fprintf(w, "<h1>%s</h1><div>%s</div>", p.Title, p.Body)
}

0 comments on commit 6e20e12

Please sign in to comment.