Skip to content

Commit 58f709a

Browse files
authored
Merge pull request #18 from cxhercules/fmt-fix
Ran go fmt ./... per section 2, Lecture 11, some formatting updates
2 parents 471a4cd + 61629d0 commit 58f709a

File tree

39 files changed

+101
-110
lines changed

39 files changed

+101
-110
lines changed

000_temp/52-race-condition/06_chan-pre-lecture/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ func main() {
3030
wg.Wait()
3131
close(c)
3232
fmt.Println("total count:", counter)
33-
}
33+
}

000_temp/55-website/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -14,4 +14,4 @@ func init() {
1414
func main() {
1515
loadRoutes()
1616
http.ListenAndServe(":8080", nil)
17-
}
17+
}

000_temp/55-website/rAbout.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"log"
5+
"net/http"
66
)
77

88
func about(w http.ResponseWriter, r *http.Request) {
@@ -11,4 +11,3 @@ func about(w http.ResponseWriter, r *http.Request) {
1111
log.Println(err)
1212
}
1313
}
14-

000_temp/55-website/rIndex.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"log"
5+
"net/http"
66
)
77

88
func index(w http.ResponseWriter, r *http.Request) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"io"
5+
"net/http"
66
)
77

88
func main() {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"io"
5+
"net/http"
66
)
77

88
func main() {
@@ -12,4 +12,4 @@ func main() {
1212

1313
func foo(w http.ResponseWriter, r *http.Request) {
1414
io.WriteString(w, "hello world")
15-
}
15+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package main
22

33
import (
4-
"net/http"
54
"io"
5+
"net/http"
66
)
77

88
func main() {
99
http.HandleFunc("/", index)
1010
http.ListenAndServe(":8080", nil)
1111
}
1212

13-
func index(w http.ResponseWriter, r *http.Request){
13+
func index(w http.ResponseWriter, r *http.Request) {
1414
io.WriteString(w, "Hello SVCC from Paypal")
1515
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"io"
5+
"net/http"
66
)
77

88
func main() {
@@ -12,4 +12,4 @@ func main() {
1212

1313
func index(w http.ResponseWriter, r *http.Request) {
1414
io.WriteString(w, "Hello GDG Fresno")
15-
}
15+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -18,4 +18,4 @@ func main() {
1818

1919
func foo(w http.ResponseWriter, r *http.Request) {
2020
tpl.ExecuteTemplate(w, "index.gohtml", nil)
21-
}
21+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -18,4 +18,4 @@ func main() {
1818

1919
func foo(w http.ResponseWriter, r *http.Request) {
2020
tpl.ExecuteTemplate(w, "index.gohtml", nil)
21-
}
21+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -16,6 +16,6 @@ func main() {
1616
http.ListenAndServe(":8080", nil)
1717
}
1818

19-
func index(w http.ResponseWriter, r *http.Request){
19+
func index(w http.ResponseWriter, r *http.Request) {
2020
tpl.ExecuteTemplate(w, "index.gohtml", nil)
2121
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -18,4 +18,4 @@ func main() {
1818

1919
func index(w http.ResponseWriter, r *http.Request) {
2020
tpl.ExecuteTemplate(w, "index.gohtml", nil)
21-
}
21+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -18,4 +18,4 @@ func main() {
1818

1919
func foo(w http.ResponseWriter, r *http.Request) {
2020
tpl.ExecuteTemplate(w, "index.gohtml", nil)
21-
}
21+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -18,4 +18,4 @@ func main() {
1818

1919
func foo(w http.ResponseWriter, r *http.Request) {
2020
tpl.ExecuteTemplate(w, "index.gohtml", nil)
21-
}
21+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -16,6 +16,6 @@ func main() {
1616
http.ListenAndServe(":8080", nil)
1717
}
1818

19-
func index(w http.ResponseWriter, r *http.Request){
19+
func index(w http.ResponseWriter, r *http.Request) {
2020
tpl.ExecuteTemplate(w, "index.gohtml", nil)
2121
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -18,4 +18,4 @@ func main() {
1818

1919
func index(w http.ResponseWriter, r *http.Request) {
2020
tpl.ExecuteTemplate(w, "index.gohtml", nil)
21-
}
21+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -23,4 +23,4 @@ func index(w http.ResponseWriter, r *http.Request) {
2323

2424
func about(w http.ResponseWriter, r *http.Request) {
2525
tpl.ExecuteTemplate(w, "about.gohtml", "OUR TEAM")
26-
}
26+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -23,4 +23,4 @@ func index(w http.ResponseWriter, r *http.Request) {
2323

2424
func about(w http.ResponseWriter, r *http.Request) {
2525
tpl.ExecuteTemplate(w, "about.gohtml", "THE TEAM")
26-
}
26+
}

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -17,11 +17,10 @@ func main() {
1717
http.ListenAndServe(":8080", nil)
1818
}
1919

20-
func index(w http.ResponseWriter, r *http.Request){
20+
func index(w http.ResponseWriter, r *http.Request) {
2121
tpl.ExecuteTemplate(w, "index.gohtml", "ACME INC")
2222
}
2323

24-
25-
func about(w http.ResponseWriter, r *http.Request){
24+
func about(w http.ResponseWriter, r *http.Request) {
2625
tpl.ExecuteTemplate(w, "about.gohtml", "ABOUT OUR TEAM")
2726
}

000_temp/56_SVCC-17/04d/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -23,4 +23,4 @@ func index(w http.ResponseWriter, r *http.Request) {
2323

2424
func about(w http.ResponseWriter, r *http.Request) {
2525
tpl.ExecuteTemplate(w, "about.gohtml", nil)
26-
}
26+
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -23,14 +23,14 @@ func index(w http.ResponseWriter, r *http.Request) {
2323

2424
func about(w http.ResponseWriter, r *http.Request) {
2525
type customData struct {
26-
Title string
26+
Title string
2727
Members []string
2828
}
2929

3030
cd := customData{
31-
Title: "OUR TEAM",
32-
Members: []string{"Moneypenny", "Bond", "Q", "M",},
31+
Title: "OUR TEAM",
32+
Members: []string{"Moneypenny", "Bond", "Q", "M"},
3333
}
3434

3535
tpl.ExecuteTemplate(w, "about.gohtml", cd)
36-
}
36+
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"net/http"
54
"html/template"
5+
"net/http"
66
)
77

88
var tpl *template.Template
@@ -23,14 +23,14 @@ func index(w http.ResponseWriter, r *http.Request) {
2323

2424
func about(w http.ResponseWriter, r *http.Request) {
2525
type customData struct {
26-
Title string
26+
Title string
2727
Members []string
2828
}
2929

3030
cd := customData{
31-
Title: "THE TEAM",
32-
Members: []string{"Moneypenny", "Bond", "Q", "M",},
31+
Title: "THE TEAM",
32+
Members: []string{"Moneypenny", "Bond", "Q", "M"},
3333
}
3434

3535
tpl.ExecuteTemplate(w, "about.gohtml", cd)
36-
}
36+
}

0 commit comments

Comments
 (0)