Index: go/src/infra/tools/cipd/local/pkgdef.go |
diff --git a/go/src/infra/tools/cipd/pkgdef.go b/go/src/infra/tools/cipd/local/pkgdef.go |
similarity index 97% |
rename from go/src/infra/tools/cipd/pkgdef.go |
rename to go/src/infra/tools/cipd/local/pkgdef.go |
index 847a6bd28dd2cc33b819da4a002940a456caf064..f4da8c3aa158b1ff1d9632bc1940a7ff6cc2e7a3 100644 |
--- a/go/src/infra/tools/cipd/pkgdef.go |
+++ b/go/src/infra/tools/cipd/local/pkgdef.go |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-package cipd |
+package local |
import ( |
"fmt" |
@@ -13,6 +13,8 @@ import ( |
"sort" |
"github.com/go-yaml/yaml" |
+ |
+ "infra/tools/cipd/common" |
) |
// PackageDef defines how exactly to build a package: what files to put into it, |
@@ -61,7 +63,7 @@ func LoadPackageDef(r io.Reader, vars map[string]string) (out PackageDef, err er |
} |
// Validate package name right away. |
- err = ValidatePackageName(out.Package) |
+ err = common.ValidatePackageName(out.Package) |
if err != nil { |
return |
} |
@@ -108,7 +110,7 @@ func (def *PackageDef) FindFiles(cwd string) ([]File, error) { |
} |
} |
- log.Info("Enumerating files to zip...") |
+ log.Infof("Enumerating files to zip...") |
for _, chunk := range def.Data { |
// Individual file. |
if chunk.File != "" { |
@@ -191,7 +193,7 @@ func makeExclusionFilter(startDir string, patterns []string) (ScanFilter, error) |
return func(abs string) bool { |
rel, err := filepath.Rel(startDir, abs) |
if err != nil { |
- log.Warnf("Unexpected error when evaluating %s: %s", abs, err) |
+ log.Warningf("Unexpected error when evaluating %s: %s", abs, err) |
return true |
} |
// Do not evaluate paths outside of startDir. |