Skip to content

Commit f495dba

Browse files
committed
commit
1 parent 97ef610 commit f495dba

File tree

2 files changed

+31
-21
lines changed

2 files changed

+31
-21
lines changed

.idea/workspace.xml

+21-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package main
22

3-
import "time"
3+
import (
4+
"net/http"
5+
"time"
6+
)
47

58
type post struct {
69
ID int
@@ -11,6 +14,11 @@ type post struct {
1114
PublishedAt time.Time
1215
}
1316

14-
func main() {
17+
func getPosts(w http.ResponseWriter, r *http.ResponseWriter) {
18+
19+
}
1520

21+
func main() {
22+
http.HandleFunc("/posts", getPosts)
23+
http.ListenAndServe(":8000", nil)
1624
}

0 commit comments

Comments
 (0)