You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kaka19ace
changed the title
proposal: divide go module dependencies into two categories: release and development
proposal: divide go module dependencies into two categories: require and testRequire
Nov 22, 2020
To clarify why Go doesn't, it's because, unlike with NPM and similar languages, the go.mod file does not specify a module's dependencies. It specifies what versions of dependencies are needed. The import statements in the Go files are the ones that actually specify dependencies, so test dependencies are automatically sorted by virtue of being imported only from test files.
dividing deps into two categories:
i think it's a clean way of dependency management.
For examples in Python/Node.js:
python: setup.py -> tests_require
eg: https://github.com/psf/requests/blob/3.0/setup.py#L126
node.js: package.json -> devDependencies
eg: https://github.com/expressjs/express/blob/4.18/package.json#L62
expected layout
go.mod:
The text was updated successfully, but these errors were encountered: