开发golang库时,是否应该始终将自己的软件包放在vendor /文件夹中?

recently i read a article http://glide.readthedocs.io/en/latest/vendor/, there are some recommendations, one of them is :

Libraries (codebases without a main package) should not store outside packages in a vendor/ folder in their VCS unless they have a specific reason and understand why they're doing it.

my question is :

according to this recommendation, should we always place our own packages(not those third party packages) in vendor/ folder when developing a golang library ?

"outside packages" means packages that live outside this repo. So, if the packages are in separate repos from the code that imports them: Yes, vendor them.

If you just want to write and use multiple packages while implementing your library: No, put them in subfolders outside vendor/ in the library repo

For example

... ▸ server/ server.go "package server" ▸ store/ ▸ testutils/ ▾ vendor/ ▸ bitbucket.org/ ▸ github.com/ ...

No, it makes no sense to add your own packages inside a vendor/ directory, because the vendor directory is meant for code external to your project.

What this recommendation means is: If you are developing a library, do not use vendor/ to store third-party libraries unless you know what you're doing and why you're doing it.