This commit is contained in:
kolaente 2022-08-14 11:35:28 +02:00
commit 4e0ee26673
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
5 changed files with 73 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.idea/
golang-intro

11
fizzbuzz.go Normal file
View File

@ -0,0 +1,11 @@
package main
import "fmt"
func FizzBuzz() {
for i := 0; i < 20; i++ {
var out string
fmt.Println(out)
}
}

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module golang-intro
go 1.17

40
main.go Normal file
View File

@ -0,0 +1,40 @@
package main
import (
"fmt"
)
func foo(bar string) string {
return "fooo" + bar
}
func main() {
// fmt.Printf("Hello %s", foo("World"))
FizzBuzz()
}
func barcamp() {
bar := &Barcamp{
Title: "local-it Barcamp 2022",
Foo: 42,
}
bar.Title = "local-it Barcamp 2023"
bar.Code()
fmt.Println(bar)
}
type Barcamp struct {
Title string
Foo int
}
func (b *Barcamp) Code() {
fmt.Println("Code")
}
func (b *Barcamp) String() string {
return b.Title
}

17
readme.md Normal file
View File

@ -0,0 +1,17 @@
# Go Intro
* Setup
* Hello World
* Variablen
* Functions
* Structs
* Interfaces
* Pointer
* Schleifen
* Packages
* Tests
* Error Handling
* Ausblick:
* Webserver
* Concurrency / Channel (Advanced)
* Maps