Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: cipd/client/cipd/ensure/item_parsers.go

Issue 2663473002: [cipd] Rename new Root terminology to Subdir. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cipd/client/cipd/ensure/good_test.go ('k') | cipd/client/cmd/cipd/main.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cipd/client/cipd/ensure/item_parsers.go
diff --git a/cipd/client/cipd/ensure/item_parsers.go b/cipd/client/cipd/ensure/item_parsers.go
index e4da252bd9db01117e08dfb0c72954ca21380045..b5f01ec3c640cb26007c64d996bdda3589f83031 100644
--- a/cipd/client/cipd/ensure/item_parsers.go
+++ b/cipd/client/cipd/ensure/item_parsers.go
@@ -18,14 +18,14 @@ type itemParser func(s *itemParserState, f *File, val string) error
// itemParserState is the state object shared between the item parsers and the
// main ParseFile implementation.
type itemParserState struct {
- curRoot string
+ curSubdir string
}
-func rootParser(s *itemParserState, _ *File, val string) error {
- if err := common.ValidateRoot(val); err != nil {
+func subdirParser(s *itemParserState, _ *File, val string) error {
+ if err := common.ValidateSubdir(val); err != nil {
return err
}
- s.curRoot = val
+ s.curSubdir = val
return nil
}
@@ -44,6 +44,6 @@ func serviceURLParser(_ *itemParserState, f *File, val string) error {
// need to add a new setting or directive, please add an appropriate function
// above and then add it to this map.
var itemParsers = map[string]itemParser{
- "@root": rootParser,
+ "@subdir": subdirParser,
"$serviceurl": serviceURLParser,
}
« no previous file with comments | « cipd/client/cipd/ensure/good_test.go ('k') | cipd/client/cmd/cipd/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698