This website works better with JavaScript.
Home
Help
Sign In
tmeissner
/
go_workshop
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Small reformatting to make linter happy
master
T. Meissner
5 years ago
parent
a84c706529
commit
1f8d7f9183
15 changed files
with
20 additions
and
37 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-2
chapter_01/activity_1.01/main.go
+1
-2
chapter_01/exercise_1.01/main.go
+0
-2
chapter_01/exercise_1.02/main.go
+4
-6
chapter_01/exercise_1.03/main.go
+2
-4
chapter_01/exercise_1.04/main.go
+1
-2
chapter_01/exercise_1.05/main.go
+0
-2
chapter_01/exercise_1.06/main.go
+1
-3
chapter_01/exercise_1.07/main.go
+1
-2
chapter_01/exercise_1.08/main.go
+1
-2
chapter_01/exercise_1.09/main.go
+1
-2
chapter_01/exercise_1.10/main.go
+1
-2
chapter_01/exercise_1.11/main.go
+1
-2
chapter_01/exercise_1.12/main.go
+2
-3
chapter_01/exercise_1.13/main.go
+3
-1
test/main.go
+ 1
- 2
chapter_01/activity_1.01/main.go
View File
@ -4,7 +4,6 @@ import (
"fmt"
)
func
main
(
)
{
firstName
:=
"Torsten"
@ -17,4 +16,4 @@ func main() {
fmt
.
Println
(
age
)
fmt
.
Println
(
peanutAllergy
)
}
}
+ 1
- 2
chapter_01/exercise_1.01/main.go
View File
@ -7,7 +7,6 @@ import (
"time"
)
func
main
(
)
{
rand
.
Seed
(
time
.
Now
(
)
.
UnixNano
(
)
)
@ -18,4 +17,4 @@ func main() {
fmt
.
Println
(
stars
)
}
}
+ 0
- 2
chapter_01/exercise_1.02/main.go
View File
@ -2,10 +2,8 @@ package main
import
"fmt"
var
foo
string
=
"bar"
func
main
(
)
{
var
baz
string
=
"qux"
+ 4
- 6
chapter_01/exercise_1.03/main.go
View File
@ -5,16 +5,14 @@ import (
"time"
)
var
(
Debug
bool
=
false
LogLevel
string
=
"info"
Debug
bool
=
false
LogLevel
string
=
"info"
startUpTime
time
.
Time
=
time
.
Now
(
)
)
func
main
(
)
{
func
main
(
)
{
fmt
.
Println
(
Debug
,
LogLevel
,
startUpTime
)
}
}
+ 2
- 4
chapter_01/exercise_1.04/main.go
View File
@ -5,14 +5,12 @@ import (
"time"
)
var
(
Debug
bool
LogLevel
=
"info"
Debug
bool
LogLevel
=
"info"
startUpTime
=
time
.
Now
(
)
)
func
main
(
)
{
fmt
.
Println
(
Debug
,
LogLevel
,
startUpTime
)
+ 1
- 2
chapter_01/exercise_1.05/main.go
View File
@ -5,7 +5,6 @@ import (
"time"
)
func
main
(
)
{
Debug
:=
false
@ -14,4 +13,4 @@ func main() {
fmt
.
Println
(
Debug
,
LogLevel
,
startUpTime
)
}
}
+ 0
- 2
chapter_01/exercise_1.06/main.go
View File
@ -5,14 +5,12 @@ import (
"time"
)
func
getConfig
(
)
(
bool
,
string
,
time
.
Time
)
{
return
false
,
"info"
,
time
.
Now
(
)
}
func
main
(
)
{
Debug
,
LogLevel
,
startUpTime
:=
getConfig
(
)
+ 1
- 3
chapter_01/exercise_1.07/main.go
View File
@ -2,10 +2,8 @@ package main
import
"fmt"
var
defaultOffset
=
10
func
main
(
)
{
offset
:=
5
@ -16,4 +14,4 @@ func main() {
offset
=
offset
+
defaultOffset
fmt
.
Println
(
offset
)
}
}
+ 1
- 2
chapter_01/exercise_1.08/main.go
View File
@ -2,11 +2,10 @@ package main
import
"fmt"
func
main
(
)
{
query
,
limit
,
offset
:=
"bat"
,
10
,
0
query
,
limit
,
offset
=
"ball"
,
offset
,
20
fmt
.
Println
(
query
,
limit
,
offset
)
}
}
+ 1
- 2
chapter_01/exercise_1.09/main.go
View File
@ -2,7 +2,6 @@ package main
import
"fmt"
func
main
(
)
{
// Main course
@ -36,4 +35,4 @@ func main() {
fmt
.
Println
(
"With this visit, you've earned a reward."
)
}
}
}
+ 1
- 2
chapter_01/exercise_1.10/main.go
View File
@ -2,7 +2,6 @@ package main
import
"fmt"
func
main
(
)
{
count
:=
5
@ -19,4 +18,4 @@ func main() {
name
+=
" Smith"
fmt
.
Println
(
name
)
}
}
+ 1
- 2
chapter_01/exercise_1.11/main.go
View File
@ -2,7 +2,6 @@ package main
import
"fmt"
func
main
(
)
{
visits
:=
15
@ -12,4 +11,4 @@ func main() {
fmt
.
Println
(
"Gold member :"
,
visits
>
20
&&
visits
<=
30
)
fmt
.
Println
(
"Platinum member:"
,
visits
>
30
)
}
}
+ 1
- 2
chapter_01/exercise_1.12/main.go
View File
@ -5,7 +5,6 @@ import (
"time"
)
func
main
(
)
{
var
count
int
@ -26,4 +25,4 @@ func main() {
var
startTime
time
.
Time
fmt
.
Printf
(
"Start: %#v \n"
,
startTime
)
}
}
+ 2
- 3
chapter_01/exercise_1.13/main.go
View File
@ -5,12 +5,11 @@ import (
"time"
)
func
main
(
)
{
var
count1
*
int
count2
:=
new
(
int
)
countTemp
:=
5
countTemp
:=
5
count3
:=
&
countTemp
t
:=
&
time
.
Time
{
}
@ -19,4 +18,4 @@ func main() {
fmt
.
Printf
(
"count3: %#v\n"
,
count3
)
fmt
.
Printf
(
"time : %#v\n"
,
t
)
}
}
+ 3
- 1
test/main.go
View File
@ -1,7 +1,9 @@
package
main
import
(
"fmt"
)
func
main
(
)
{
fmt
.
Println
(
"This is a test"
)
}
}
Write
Preview
Loading…
Cancel
Save