Skip to content

fix(examples/multichat): fix textarea.Update call for value receiver of textarea.Model - #568

Merged
taciturnaxolotl merged 1 commit into
charmbracelet:mainfrom
darororo:main
Jul 30, 2026
Merged

taciturnaxolotl merged 1 commit into
charmbracelet:mainfrom
darororo:main

Conversation

@darororo

Copy link
Copy Markdown

Contributing Guidelines

  • I have read CONTRIBUTING.md.
  • I have created a discussion that was approved by a maintainer (for new features).
  • This is a bug fix, so no prior discussion is required.

Steps to reproduce

cd examples/multichat
go run .

Errors

./main.go:142:16: cannot use ta (variable of struct type textarea.Model) as *textarea.Model value in struct literal
./main.go:160:22: cannot use m.textarea.Update(msg) (value of struct type textarea.Model) as *textarea.Model value in assignment

The example fails to compile because textarea.Model.Update expects a value receiver of textarea.Model .

Solution

In the main model struct, the field textarea is a pointer *textarea.Model, the fix is to change the type of textarea to be the struct textarea.Model instead.

@taciturnaxolotl
taciturnaxolotl merged commit 8a42f82 into charmbracelet:main Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址