Skip to content

Commit e7223fb

Browse files
authored
fix: odd indentation in README (#928)
1 parent 05bedf3 commit e7223fb

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ Given the following struct, let's see how to read it and write it as TOML:
9898

9999
```go
100100
type MyConfig struct {
101-
Version int
102-
Name string
103-
Tags []string
101+
Version int
102+
Name string
103+
Tags []string
104104
}
105105
```
106106

@@ -119,7 +119,7 @@ tags = ["go", "toml"]
119119
var cfg MyConfig
120120
err := toml.Unmarshal([]byte(doc), &cfg)
121121
if err != nil {
122-
panic(err)
122+
panic(err)
123123
}
124124
fmt.Println("version:", cfg.Version)
125125
fmt.Println("name:", cfg.Name)
@@ -140,14 +140,14 @@ as a TOML document:
140140

141141
```go
142142
cfg := MyConfig{
143-
Version: 2,
144-
Name: "go-toml",
145-
Tags: []string{"go", "toml"},
143+
Version: 2,
144+
Name: "go-toml",
145+
Tags: []string{"go", "toml"},
146146
}
147147

148148
b, err := toml.Marshal(cfg)
149149
if err != nil {
150-
panic(err)
150+
panic(err)
151151
}
152152
fmt.Println(string(b))
153153

@@ -293,16 +293,16 @@ element in the interface to decode the object. For example:
293293

294294
```go
295295
type inner struct {
296-
B interface{}
296+
B interface{}
297297
}
298298
type doc struct {
299-
A interface{}
299+
A interface{}
300300
}
301301

302302
d := doc{
303-
A: inner{
304-
B: "Before",
305-
},
303+
A: inner{
304+
B: "Before",
305+
},
306306
}
307307

308308
data := `
@@ -341,7 +341,7 @@ contained in the doc is superior to the capacity of the array. For example:
341341

342342
```go
343343
type doc struct {
344-
A [2]string
344+
A [2]string
345345
}
346346
d := doc{}
347347
err := toml.Unmarshal([]byte(`A = ["one", "two", "many"]`), &d)

0 commit comments

Comments
 (0)