Skip to content

Commit fedbab3

Browse files
surajssdhasbro17
authored andcommitted
pkg/generator: Add prune to Gopkg.toml template (#413)
The code that gets vendored by dep by default is huge. We can leverage the functionality given by dep viz. prune. This will remove all the non-go code and unused packages. It makes an exception to the k8s.io/code-generator repository. Since we use the scripts from this repository to generate code. Ref: https://golang.github.io/dep/docs/Gopkg.toml.html#prune
1 parent d83da01 commit fedbab3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/generator/templates.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,16 @@ required = [
281281
name = "sigs.k8s.io/controller-runtime"
282282
revision = "60bb251ad86f9b313653618aad0c2c53f41a6625"
283283
284+
[prune]
285+
go-tests = true
286+
non-go = true
287+
unused-packages = true
288+
289+
[[prune.project]]
290+
name = "k8s.io/code-generator"
291+
non-go = false
292+
unused-packages = false
293+
284294
[[constraint]]
285295
name = "github.com/operator-framework/operator-sdk"
286296
# The version rule is used for a specific release and the master branch for in between releases.

0 commit comments

Comments
 (0)