Skip to content

W0302: A live page configured by struct tags ​

A live page's field tags bind:, url:, defer: and validate: are the form of earlier releases. They still work for one minor release; the attributes say the same, checked by the compiler and completed by the editor. vuka fix attributes rewrites them. Reported by vuka vet.

Wrong ​

vuka
type Orders struct {
	ui.Live
	Q    string  `bind:"q,debounce=500" url:"q" validate:"max=50"`
	Rows []Order `defer:"lists"`
}
vuka
type Orders struct {
	ui.Live
	Q    string  @ui.Bind{Debounce: 500 * time.Millisecond} @ui.URL("q") @validate.Max(50)
	Rows []Order @ui.Defer("lists")
}

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.