Skip to content

Ran go fmt ./... per section 2, Lecture 11, some formatting updates #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 000_temp/52-race-condition/06_chan-pre-lecture/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ func main() {
wg.Wait()
close(c)
fmt.Println("total count:", counter)
}
}
4 changes: 2 additions & 2 deletions 000_temp/55-website/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

var tpl *template.Template
Expand All @@ -14,4 +14,4 @@ func init() {
func main() {
loadRoutes()
http.ListenAndServe(":8080", nil)
}
}
3 changes: 1 addition & 2 deletions 000_temp/55-website/rAbout.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"log"
"net/http"
)

func about(w http.ResponseWriter, r *http.Request) {
Expand All @@ -11,4 +11,3 @@ func about(w http.ResponseWriter, r *http.Request) {
log.Println(err)
}
}

2 changes: 1 addition & 1 deletion 000_temp/55-website/rIndex.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"log"
"net/http"
)

func index(w http.ResponseWriter, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion 000_temp/56_SVCC-17/01a/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"io"
"net/http"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/01b/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"io"
"net/http"
)

func main() {
Expand All @@ -12,4 +12,4 @@ func main() {

func foo(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "hello world")
}
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/01c/main.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package main

import (
"net/http"
"io"
"net/http"
)

func main() {
http.HandleFunc("/", index)
http.ListenAndServe(":8080", nil)
}

func index(w http.ResponseWriter, r *http.Request){
func index(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "Hello SVCC from Paypal")
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/01d/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"io"
"net/http"
)

func main() {
Expand All @@ -12,4 +12,4 @@ func main() {

func index(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "Hello GDG Fresno")
}
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/02a/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func foo(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "index.gohtml", nil)
}
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/02b/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func foo(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "index.gohtml", nil)
}
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/02c/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func index(w http.ResponseWriter, r *http.Request){
func index(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "index.gohtml", nil)
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/02d/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func index(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "index.gohtml", nil)
}
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/03a/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func foo(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "index.gohtml", nil)
}
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/03b/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func foo(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "index.gohtml", nil)
}
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/03c/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func index(w http.ResponseWriter, r *http.Request){
func index(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "index.gohtml", nil)
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/03d/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func index(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "index.gohtml", nil)
}
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/04a/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func about(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "about.gohtml", "OUR TEAM")
}
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/04b/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func about(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "about.gohtml", "THE TEAM")
}
}
7 changes: 3 additions & 4 deletions 000_temp/56_SVCC-17/04c/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func index(w http.ResponseWriter, r *http.Request){
func index(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "index.gohtml", "ACME INC")
}


func about(w http.ResponseWriter, r *http.Request){
func about(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "about.gohtml", "ABOUT OUR TEAM")
}
4 changes: 2 additions & 2 deletions 000_temp/56_SVCC-17/04d/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func about(w http.ResponseWriter, r *http.Request) {
tpl.ExecuteTemplate(w, "about.gohtml", nil)
}
}
10 changes: 5 additions & 5 deletions 000_temp/56_SVCC-17/05a/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func about(w http.ResponseWriter, r *http.Request) {
type customData struct {
Title string
Title string
Members []string
}

cd := customData{
Title: "OUR TEAM",
Members: []string{"Moneypenny", "Bond", "Q", "M",},
Title: "OUR TEAM",
Members: []string{"Moneypenny", "Bond", "Q", "M"},
}

tpl.ExecuteTemplate(w, "about.gohtml", cd)
}
}
10 changes: 5 additions & 5 deletions 000_temp/56_SVCC-17/05b/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"net/http"
"html/template"
"net/http"
)

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

func about(w http.ResponseWriter, r *http.Request) {
type customData struct {
Title string
Title string
Members []string
}

cd := customData{
Title: "THE TEAM",
Members: []string{"Moneypenny", "Bond", "Q", "M",},
Title: "THE TEAM",
Members: []string{"Moneypenny", "Bond", "Q", "M"},
}

tpl.ExecuteTemplate(w, "about.gohtml", cd)
}
}
Loading