docs: Add more Gopkg.toml examples for prune rules

This commit is contained in:
sam boyer 2018-01-28 21:23:23 -05:00
Родитель 8c437349f4
Коммит 944e34b9ac
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -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: