Skip to content

Commit 9af5e5c

Browse files
committed
you're doing great
1 parent 22f6efe commit 9af5e5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+828
-0
lines changed

000_temp/56_SVCC-17/01a/main.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package main
2+
3+
import (
4+
"net/http"
5+
"io"
6+
)
7+
8+
func main() {
9+
http.HandleFunc("/", foo)
10+
http.ListenAndServe(":8080", nil)
11+
}
12+
13+
func foo(w http.ResponseWriter, r *http.Request) {
14+
io.WriteString(w, "Hello world")
15+
}

000_temp/56_SVCC-17/01b/main.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package main
2+
3+
import (
4+
"net/http"
5+
"io"
6+
)
7+
8+
func main() {
9+
http.HandleFunc("/", foo)
10+
http.ListenAndServe(":8080", nil)
11+
}
12+
13+
func foo(w http.ResponseWriter, r *http.Request) {
14+
io.WriteString(w, "hello world")
15+
}

000_temp/56_SVCC-17/01c/main.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package main
2+
3+
import (
4+
"net/http"
5+
"io"
6+
)
7+
8+
func main() {
9+
http.HandleFunc("/", index)
10+
http.ListenAndServe(":8080", nil)
11+
}
12+
13+
func index(w http.ResponseWriter, r *http.Request){
14+
io.WriteString(w, "Hello SVCC from Paypal")
15+
}

000_temp/56_SVCC-17/02a/main.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package main
2+
3+
import (
4+
"net/http"
5+
"html/template"
6+
)
7+
8+
var tpl *template.Template
9+
10+
func init() {
11+
tpl = template.Must(template.ParseGlob("templates/*"))
12+
}
13+
14+
func main() {
15+
http.HandleFunc("/", foo)
16+
http.ListenAndServe(":8080", nil)
17+
}
18+
19+
func foo(w http.ResponseWriter, r *http.Request) {
20+
tpl.ExecuteTemplate(w, "index.gohtml", nil)
21+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Document</title>
6+
</head>
7+
<body>
8+
9+
<h1>Hello world</h1>
10+
11+
</body>
12+
</html>

000_temp/56_SVCC-17/02b/main.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package main
2+
3+
import (
4+
"net/http"
5+
"html/template"
6+
)
7+
8+
var tpl *template.Template
9+
10+
func init() {
11+
tpl = template.Must(template.ParseGlob("templates/*"))
12+
}
13+
14+
func main() {
15+
http.HandleFunc("/", foo)
16+
http.ListenAndServe(":8080", nil)
17+
}
18+
19+
func foo(w http.ResponseWriter, r *http.Request) {
20+
tpl.ExecuteTemplate(w, "index.gohtml", nil)
21+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Document</title>
6+
</head>
7+
<body>
8+
9+
<h1>HELLO FROM PAYPAL IN CALIFORNIA</h1>
10+
11+
</body>
12+
</html>

000_temp/56_SVCC-17/02c/main.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package main
2+
3+
import (
4+
"net/http"
5+
"html/template"
6+
)
7+
8+
var tpl *template.Template
9+
10+
func init() {
11+
tpl = template.Must(template.ParseGlob("templates/*"))
12+
}
13+
14+
func main() {
15+
http.HandleFunc("/", index)
16+
http.ListenAndServe(":8080", nil)
17+
}
18+
19+
func index(w http.ResponseWriter, r *http.Request){
20+
tpl.ExecuteTemplate(w, "index.gohtml", nil)
21+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Document</title>
6+
</head>
7+
<body>
8+
9+
<h1>HELLO FROM SVCC 2017 WOOHOOO!!!</h1>
10+
11+
</body>
12+
</html>

000_temp/56_SVCC-17/03a/main.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package main
2+
3+
import (
4+
"net/http"
5+
"html/template"
6+
)
7+
8+
var tpl *template.Template
9+
10+
func init() {
11+
tpl = template.Must(template.ParseGlob("templates/*"))
12+
}
13+
14+
func main() {
15+
http.HandleFunc("/", foo)
16+
http.ListenAndServe(":8080", nil)
17+
}
18+
19+
func foo(w http.ResponseWriter, r *http.Request) {
20+
tpl.ExecuteTemplate(w, "index.gohtml", nil)
21+
}

0 commit comments

Comments
 (0)