Skip to content

E0116: Malformed static ​

A static belongs to a type of this package: static Name = value in the struct body, or func Type.Name() for a static method. Its name can't be a field or method of the type, and a generic type's static method names the type parameters as the type declares them.

Wrong ​

vuka
type User struct {
	Name string

	static Name = "user"
}
vuka
type User struct {
	Name string

	static Label = "user"
}

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.