Merge pull request #963 from chimit/patch-1

Fix indentation for Golang
This commit is contained in:
Rico Sta. Cruz 2019-12-18 13:43:07 +11:00 committed by GitHub
commit 9661eff7dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

14
go.md
View File

@ -202,9 +202,9 @@ See: [Switch](https://github.com/golang/go/wiki/Switch)
### For loop
```go
for count := 0; count <= 10; count++ {
fmt.Println("My counter is at", count)
}
for count := 0; count <= 10; count++ {
fmt.Println("My counter is at", count)
}
```
See: [For loops](https://tour.golang.org/flowcontrol/1)
@ -212,10 +212,10 @@ See: [For loops](https://tour.golang.org/flowcontrol/1)
### For-Range loop
```go
entry := []string{"Jack","John","Jones"}
for i, val := range entry {
fmt.Printf("At position %d, the character %s is present\n", i, val)
}
entry := []string{"Jack","John","Jones"}
for i, val := range entry {
fmt.Printf("At position %d, the character %s is present\n", i, val)
}
```
See: [For-Range loops](https://gobyexample.com/range)