Skip to content

E0334: Two Update methods take URL parameters ​

On a live patch, the Update taking a struct embedding web.URLParams receives the new URL. Two of them leave the framework no way to choose. Reported at boot.

Wrong ​

vuka
func (o *Orders) Update(p ByStatus) error { … }   // ByStatus and ByQuery
func (o *Orders) Update(p ByQuery) error { … }    // both embed web.URLParams
vuka
type OrdersURL struct {
	web.URLParams
	Status string `url:"status"`
	Q      string `url:"q"`
}

func (o *Orders) Update(p OrdersURL) error { … }

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.