This repository was archived by the owner on Sep 9, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ func (c *Config) Run() int {
6767 & initCommand {},
6868 & statusCommand {},
6969 & ensureCommand {},
70+ & pruneCommand {},
7071 & hashinCommand {},
7172 & versionCommand {},
7273 }
Original file line number Diff line number Diff line change 1+ // Copyright 2017 The Go Authors. All rights reserved.
2+ // Use of this source code is governed by a BSD-style
3+ // license that can be found in the LICENSE file.
4+
5+ package main
6+
7+ import (
8+ "flag"
9+
10+ "github.com/golang/dep"
11+ )
12+
13+ const pruneShortHelp = `Prune was merged into ensure. Use ensure instead.`
14+ const pruneLongHelp = `
15+ Prune was merged into the ensure command.
16+ Set prune options in the manifest and it will be applied after every ensure.
17+ `
18+
19+ type pruneCommand struct {}
20+
21+ func (cmd * pruneCommand ) Name () string { return "prune" }
22+ func (cmd * pruneCommand ) Args () string { return "" }
23+ func (cmd * pruneCommand ) ShortHelp () string { return pruneShortHelp }
24+ func (cmd * pruneCommand ) LongHelp () string { return pruneLongHelp }
25+ func (cmd * pruneCommand ) Hidden () bool { return true }
26+
27+ func (cmd * pruneCommand ) Register (fs * flag.FlagSet ) {}
28+
29+ func (cmd * pruneCommand ) Run (ctx * dep.Ctx , args []string ) error {
30+ ctx .Out .Printf ("Prune was merged into ensure.\n " )
31+ ctx .Out .Printf ("Set prune settings in %s and it it will be applied when running ensure.\n " , dep .ManifestName )
32+
33+ return nil
34+ }
You can’t perform that action at this time.
0 commit comments