Skip to content

Commit 672a1bc

Browse files
authored
Add Golang syntax highlighting to README docs (bregman-arie#317)
1 parent ad12a30 commit 672a1bc

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

README-zh_CN.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,7 +2330,7 @@ with <code>var x int = 2</code> we are setting the variable type to integer whil
23302330
<details>
23312331
<summary>下面代码块有什么问题? 怎么解决?
23322332

2333-
```
2333+
```go
23342334
func main() {
23352335
var x float32 = 13.5
23362336
var y int
@@ -2343,7 +2343,7 @@ func main() {
23432343
<details>
23442344
<summary>下面的代码块尝试将整数101转换为字符串,但相反,我们得到“ e”。 这是为什么? 怎么解决?
23452345

2346-
```
2346+
```go
23472347
package main
23482348

23492349
import "fmt"
@@ -2379,7 +2379,7 @@ func main() {
23792379
<details>
23802380
<summary>以下代码块的输出是什么?:
23812381

2382-
```
2382+
```go
23832383
package main
23842384

23852385
import "fmt"
@@ -2406,7 +2406,7 @@ func main() {
24062406
<details>
24072407
<summary>以下代码块的输出是什么?:
24082408

2409-
```
2409+
```go
24102410
package main
24112411

24122412
import "fmt"

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,8 @@ func main() {
966966
<details>
967967
<summary>The following block of code tries to convert the integer 101 to a string but instead we get "e". Why is that? How to fix it?
968968

969-
```
969+
970+
```go
970971
package main
971972

972973
import "fmt"
@@ -1007,7 +1008,7 @@ But `x`, `y` and their sum is variable.
10071008
<details>
10081009
<summary>What will be the output of the following block of code?:
10091010

1010-
```
1011+
```go
10111012
package main
10121013

10131014
import "fmt"
@@ -1045,7 +1046,7 @@ It is called the [blank identifier](https://golang.org/doc/effective_go.html#bla
10451046
<details>
10461047
<summary>What will be the output of the following block of code?:
10471048

1048-
```
1049+
```go
10491050
package main
10501051

10511052
import "fmt"
@@ -1067,7 +1068,7 @@ Since the first iota is declared with the value `3` (` + 3`), the next one has t
10671068
<details>
10681069
<summary>What will be the output of the following block of code?:
10691070

1070-
```
1071+
```go
10711072
package main
10721073

10731074
import (
@@ -1106,7 +1107,7 @@ Output: 2 1 3
11061107
<details>
11071108
<summary>What will be the output of the following block of code?:
11081109

1109-
```
1110+
```go
11101111
package main
11111112

11121113
import (
@@ -1160,7 +1161,7 @@ But in `mod2`, `append` creats new slice, and we're changing only `a` value, not
11601161
<details>
11611162
<summary>What will be the output of the following block of code?:
11621163

1163-
```
1164+
```go
11641165
package main
11651166

11661167
import (

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy