[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
This commit is contained in:
Anton Gilgur 2025-11-25 05:16:01 -05:00 committed by GitHub
commit 9578b627fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 12 deletions

View file

@ -63,17 +63,17 @@ func main() {
type App struct {
ctx context.Context
ctx context.Context
}
func (b *App) startup(ctx context.Context) {
b.ctx = ctx
b.ctx = ctx
}
func (b *App) shutdown(ctx context.Context) {}
func (b *App) Greet(name string) string {
return fmt.Sprintf("Hello %s!", name)
return fmt.Sprintf("Hello %s!", name)
}
```
@ -178,18 +178,18 @@ func main() {
type App struct {
ctx context.Context
ctx context.Context
}
func (a *App) Greet(name string) string {
return fmt.Sprintf("Hello %s!", name)
return fmt.Sprintf("Hello %s!", name)
}
```
You may bind as many structs as you like. Just make sure you create an instance of it and pass it in `Bind`:
```go {10-12}
//...
//...
err := wails.Run(&options.App{
Title: "Basic Demo",
Width: 1024,
@ -203,7 +203,6 @@ You may bind as many structs as you like. Just make sure you create an instance
&mystruct2{},
},
})
```
You may bind enums types as well.
@ -237,7 +236,7 @@ var AllWeekdays = []struct {
```
```go {10-12}
//...
//...
err := wails.Run(&options.App{
Title: "Basic Demo",
Width: 1024,
@ -250,11 +249,10 @@ var AllWeekdays = []struct {
&mystruct1{},
&mystruct2{},
},
EnumBind: []interface{}{
AllWeekdays,
},
EnumBind: []interface{}{
AllWeekdays,
},
})
```
When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following:

View file

@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- Fixed indentation in "How does it work?" page by @agilgur5 in [#4733](https://github.com/wailsapp/wails/pull/4733)
## v2.11.0 - 2025-11-08
### Added