Skip to content

E0714: A Params struct makes no parameter folder ​

In vuka 1 a folder declaring type Params struct was a path parameter, and its pages embedded Params. A parameter is a bracketed name now: [employer]/ is {employer}, and its type is the field of its name on the structs that read it. A Params in a pages package binds nothing, so it is this error, at the type.

Wrong ​

go
// pages/employers/employer/params.go
package employer

type Params struct {
	Employer int
}
html
<!-- pages/employers/[employer]/index.vuka.html -->
<script lang="go">
package employer

type Index struct {
	Employer int
}
</script>

<h1>Employer {Employer}</h1>

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.