Source File
text.go
Belonging Package
github.com/pancsta/go-app/pkg/app
package appimport ()// Text returns a UI element representing plain text, converting the provided// value to its string representation.func ( any) UI {return &text{value: toString()}}// Textf returns a UI element representing formatted text. The format and values// follow the conventions of fmt.Sprintf.func ( string, ...any) UI {return &text{value: fmt.Sprintf(, ...)}}type text struct {jsvalue ValueparentElement UIvalue string}func ( *text) () Value {return .jsvalue}func ( *text) () bool {return .jsvalue != nil}func ( *text) () UI {return .parentElement}func ( *text) ( UI) UI {.parentElement =return}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |