Skip to content

Commit 9578b62

Browse files
authored
[v2] docs(how): fix inconsistent indentation (#4733)
* [v2] docs(how): fix inconsistent indentation - several places had mixed indentation (tabs _and_ spaces) - some lines had incorrect indentation, partially due to the above * add changelog entry per PR template
1 parent 4c464b3 commit 9578b62

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

website/docs/howdoesitwork.mdx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ func main() {
6363

6464

6565
type App struct {
66-
ctx context.Context
66+
ctx context.Context
6767
}
6868

6969
func (b *App) startup(ctx context.Context) {
70-
b.ctx = ctx
70+
b.ctx = ctx
7171
}
7272

7373
func (b *App) shutdown(ctx context.Context) {}
7474

7575
func (b *App) Greet(name string) string {
76-
return fmt.Sprintf("Hello %s!", name)
76+
return fmt.Sprintf("Hello %s!", name)
7777
}
7878
```
7979

@@ -178,18 +178,18 @@ func main() {
178178

179179

180180
type App struct {
181-
ctx context.Context
181+
ctx context.Context
182182
}
183183

184184
func (a *App) Greet(name string) string {
185-
return fmt.Sprintf("Hello %s!", name)
185+
return fmt.Sprintf("Hello %s!", name)
186186
}
187187
```
188188

189189
You may bind as many structs as you like. Just make sure you create an instance of it and pass it in `Bind`:
190190

191191
```go {10-12}
192-
//...
192+
//...
193193
err := wails.Run(&options.App{
194194
Title: "Basic Demo",
195195
Width: 1024,
@@ -203,7 +203,6 @@ You may bind as many structs as you like. Just make sure you create an instance
203203
&mystruct2{},
204204
},
205205
})
206-
207206
```
208207

209208
You may bind enums types as well.
@@ -237,7 +236,7 @@ var AllWeekdays = []struct {
237236
```
238237

239238
```go {10-12}
240-
//...
239+
//...
241240
err := wails.Run(&options.App{
242241
Title: "Basic Demo",
243242
Width: 1024,
@@ -250,11 +249,10 @@ var AllWeekdays = []struct {
250249
&mystruct1{},
251250
&mystruct2{},
252251
},
253-
EnumBind: []interface{}{
254-
AllWeekdays,
255-
},
252+
EnumBind: []interface{}{
253+
AllWeekdays,
254+
},
256255
})
257-
258256
```
259257

260258
When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following:

website/src/pages/changelog.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414

1515
## [Unreleased]
1616

17+
### Fixed
18+
19+
- Fixed indentation in "How does it work?" page by @agilgur5 in [#4733](https://github.com/wailsapp/wails/pull/4733)
20+
1721
## v2.11.0 - 2025-11-08
1822

1923
### Added

0 commit comments

Comments
 (0)