olebedev / go-starter-kit

[abandoned] Golang isomorphic react/hot reloadable/redux/css-modules/SSR starter kit
Other
2.82k stars 358 forks source link

Why does go-starter-kit need to be installed in $GOPATH/src? #46

Closed ricochet2200 closed 8 years ago

ricochet2200 commented 8 years ago

I don't need a full explanation if someone could just point me to some code or docs, but I'm trying to understand why go-starter-kit needs to be installed in $GOPATH/src.

I have a production react on rails project that is having some performance issues (shocker I know). I'm attempting to use have rails redirect slow routs to this project. Overtime I'd like to move off rails completely. I've seen articles where other people have migrated from rails I route at a time over an extended time so I have reason to believe it will work, but nothing where both projects are using react.

It would make sense to have the go-starter-kit run in the same directory as the current rails code so they can share the react components during the transition. The need to install to $GOPATH/src seems confusing and somewhat inconvenient to me. If I could understand why it is being done it would help me make good decisions moving forward.

Thanks in advance.

olebedev commented 8 years ago

Hi @ricochet2200,

the reason that the project needs to be somewhere in $GOPATH is correct work with ./vendor/ folder.

There at least two ways to solve your issue:

ricochet2200 commented 8 years ago

Thanks for your quick response, we'll probably end up using the symlink.

To make sure I understand, does ./vendor have this requirement because of srlt or is it the requirement only for this project?

olebedev commented 8 years ago

./vendorfolder is convention of go toolchain. Read the spec for more info. slrt and this project just follow it.

ricochet2200 commented 8 years ago

Thanks.