Skip to content

Commit 5af87d5

Browse files
committed
you're doing great
1 parent 075eb0d commit 5af87d5

File tree

1,236 files changed

+22135
-66
lines changed

Some content is hidden

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

1,236 files changed

+22135
-66
lines changed
File renamed without changes.

000_temp/02_hello/main.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
)
6+
7+
func main() {
8+
x := "Hello, class!"
9+
fmt.Println(x)
10+
}

000_temp/03_christmas/letter.phpasp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
{{range .}}
3+
*************************************
4+
Merry Christmas, {{.}} -
5+
6+
I hope the holiday season finds you well.
7+
8+
Blah blah blah.
9+
10+
Happy New Year, too!
11+
The McLeods
12+
{{end}}

000_temp/03_christmas/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+
"fmt"
5+
"os"
6+
"text/template"
7+
)
8+
9+
func main() {
10+
tpl, err := template.ParseFiles("letter.phpasp")
11+
if err != nil {
12+
fmt.Println("There was an error parsing file", err)
13+
}
14+
15+
friends := []string{"Alex", "Conor", "Ken", "Ronnie", "Patick", "Nina", "Jeremy", "Gentry", "Christian"}
16+
17+
err = tpl.Execute(os.Stdout, friends)
18+
if err != nil {
19+
fmt.Println("There was an error executing template", err)
20+
}
21+
}

000_temp/04_tcp-sample/main.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package main
2+
3+
import (
4+
"bufio"
5+
"fmt"
6+
"net"
7+
)
8+
9+
func main() {
10+
conn, err := net.Dial("tcp", "golang.org:80")
11+
if err != nil {
12+
// handle error
13+
}
14+
15+
fmt.Fprintf(conn, "GET / HTTP/1.0\r\n\r\n")
16+
status, err := bufio.NewReader(conn).ReadString('\n')
17+
fmt.Println(status)
18+
}

000_temp/05_tcp-sample/main.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package main
2+
3+
import (
4+
"io"
5+
"log"
6+
"net"
7+
)
8+
9+
func main() {
10+
// Listen on TCP port 2000 on all interfaces.
11+
l, err := net.Listen("tcp", ":2000")
12+
if err != nil {
13+
log.Fatal(err)
14+
}
15+
defer l.Close()
16+
for {
17+
// Wait for a connection.
18+
conn, err := l.Accept()
19+
if err != nil {
20+
log.Fatal(err)
21+
}
22+
// Handle the connection in a new goroutine.
23+
// The loop then returns to accepting, so that
24+
// multiple connections may be served concurrently.
25+
go func(c net.Conn) {
26+
// Echo all incoming data.
27+
io.Copy(c, c)
28+
// Shut down the connection.
29+
c.Close()
30+
}(conn)
31+
}
32+
}
File renamed without changes.
File renamed without changes.

000_temp/08_flexbox/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title</title>
6+
<link rel="stylesheet" href="main.css">
7+
</head>
8+
<body>
9+
10+
<div class="container">
11+
<p>001</p><p>002</p><p>003</p><p>004</p><p>005</p><p>006</p><p>007</p><p>008</p><p>009</p><p>010</p><p>011</p><p>
12+
012</p><p>013</p><p>014</p><p>015</p><p>016</p><p>017</p><p>018</p><p>019</p><p>020</p>
13+
</div>
14+
15+
</body>
16+
</html>

000_temp/08_flexbox/main.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.container {
2+
display: flex;
3+
flex-flow: row wrap;
4+
}
5+
6+
p {
7+
border: 2px solid hotpink;
8+
}

0 commit comments

Comments
 (0)