Skip to content

E0717: Two Go files declare one method func ​

A file's method funcs — GET, POST, PUT, PATCH, DELETE — answer on its path: index.vuka's on its folder's, [id].vuka's on {id}. Two files of one package declaring GET would be one name twice; vuka renames a .vuka file's (GET_id), and can't rename a .go file's. Reported at the second file.

Wrong ​

text
pages/api/pets/index.go      func GET(ctx context.Context) ([]Pet, error)
pages/api/pets/search.go     func GET(ctx context.Context, q Query) ([]Pet, error)
text
pages/api/pets/index.vuka    func GET(ctx context.Context) ([]Pet, error)
pages/api/pets/search.vuka   func GET(ctx context.Context, q Query) ([]Pet, 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.