Skip to content

E0127: ui.HTML isn't given one value per label ​

ui.HTML's markup has labelled holes, {o.Ref}, and the call gives one value for each label, in the order the labels first appear; a label written twice is one value. It is given more or fewer, so the render fails with the markup's place and nothing is shown. Reported by vukavet, and when the markup renders.

Wrong ​

go
func OrderRow(o Order) ui.Node {
	return ui.HTML(`<tr><td>{o.Ref}</td><td>{money(o.Total)}</td></tr>`, o.Ref)
}
go
func OrderRow(o Order) ui.Node {
	return ui.HTML(`<tr><td>{o.Ref}</td><td>{money(o.Total)}</td></tr>`, o.Ref, money(o.Total))
}

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.