How to import nested local file

51 views Asked by At

Before:

actions
├── app.go
├── upload_sessions.go
├── upload_sessions_test.go

What I want to change it to:

actions
├── app.go
├── v2
│   ├── upload_sessions.go
│   └── upload_sessions_test.go

When I try nesting the upload_sessions.go file in the v2/ folder and adding this import:

import ("actions/v2")

1) my go formatter in VIM deletes it (since it is unused), and 2) the compiler errors in app.go with:

uploadSessionResource := UploadSessionResource{} // this causes a compiler error: actions/app.go:80:28: undefined: UploadSessionResource

What do I need to do to import a local file in Go / Buffalo?

0

There are 0 answers