зеркало из https://github.com/golang/dep.git
docs: Add more Gopkg.toml examples for prune rules
This commit is contained in:
Родитель
8c437349f4
Коммит
944e34b9ac
|
@ -198,7 +198,7 @@ Pruning is disabled by default. It can be enabled by setting them to `true` at t
|
|||
non-go = true
|
||||
```
|
||||
|
||||
The same prune options can be defined per-project. An addtional `name` field is required and, as with should represent a project and not a package.
|
||||
The same prune options can be defined per-project. An addtional `name` field is required and, as with `[[constraint]]` and `[[override]]`, should be a [source root](glossary.md#source-root), not just any import path.
|
||||
|
||||
|
||||
```toml
|
||||
|
@ -210,6 +210,14 @@ The same prune options can be defined per-project. An addtional `name` field is
|
|||
go-tests = true
|
||||
non-go = false
|
||||
```
|
||||
Most projects will be fine with enabling all the pruning rules globally, and needn't set any project-specific rules:
|
||||
|
||||
```toml
|
||||
[prune]
|
||||
unused-packages = true
|
||||
non-go = true
|
||||
go-tests = true
|
||||
```
|
||||
# Example
|
||||
|
||||
A sample `Gopkg.toml` with most elements present:
|
||||
|
|
Загрузка…
Ссылка в новой задаче