Skip to content

Commit

Permalink
Merge pull request golang#1365 from antham/master
Browse files Browse the repository at this point in the history
Fix several typos and formatting issues
  • Loading branch information
carolynvs authored Nov 10, 2017
2 parents cb0f9fd + 7a62b1a commit 84cf7b3
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions cmd/dep/ensure.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dep ensure
dep ensure -vendor-only
Write vendor/ from an exising Gopkg.lock file, without first verifying that
Write vendor/ from an existing Gopkg.lock file, without first verifying that
the lock is in sync with imports and Gopkg.toml. (This may be useful for
e.g. strategically layering a Docker images)
Expand Down Expand Up @@ -449,7 +449,7 @@ func (cmd *ensureCommand) runAdd(ctx *dep.Ctx, args []string, p *dep.Project, sm
exrmap[root] = true
}

// Note: these flags are only partialy used by the latter parts of the
// Note: these flags are only partially used by the latter parts of the
// algorithm; rather, it relies on inference. However, they remain in their
// entirety as future needs may make further use of them, being a handy,
// terse way of expressing the original context of the arg inputs.
Expand Down
6 changes: 3 additions & 3 deletions internal/gps/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,10 @@ func TestSourceCreationCounts(t *testing.T) {
},
"case variance across path and URL-based access": {
roots: []ProjectIdentifier{
ProjectIdentifier{ProjectRoot: ProjectRoot("github.com/sdboyer/gpkt"), Source: "https://github.com/Sdboyer/gpkt"},
ProjectIdentifier{ProjectRoot: ProjectRoot("github.com/sdboyer/gpkt"), Source: "https://github.com/SdbOyer/gpkt"},
{ProjectRoot: ProjectRoot("github.com/sdboyer/gpkt"), Source: "https://github.com/Sdboyer/gpkt"},
{ProjectRoot: ProjectRoot("github.com/sdboyer/gpkt"), Source: "https://github.com/SdbOyer/gpkt"},
mkPI("github.com/sdboyer/gpkt"),
ProjectIdentifier{ProjectRoot: ProjectRoot("github.com/sdboyer/gpkt"), Source: "https://github.com/sdboyeR/gpkt"},
{ProjectRoot: ProjectRoot("github.com/sdboyer/gpkt"), Source: "https://github.com/sdboyeR/gpkt"},
mkPI("github.com/sdboyeR/gpkt"),
},
namecount: 6,
Expand Down
2 changes: 1 addition & 1 deletion internal/gps/pkgtree/digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func DigestFromDirectory(osDirname string) ([]byte, error) {
}

// VendorStatus represents one of a handful of possible status conditions for a
// particular file sytem node in the vendor directory tree.
// particular file system node in the vendor directory tree.
type VendorStatus uint8

const (
Expand Down
6 changes: 3 additions & 3 deletions internal/gps/pkgtree/digest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ func TestVerifyDepTree(t *testing.T) {
vendorRoot := getTestdataVerifyRoot(t)

wantSums := map[string][]byte{
"github.com/alice/match": []byte{0x7e, 0x10, 0x6, 0x2f, 0x8, 0x3, 0x3c, 0x76, 0xae, 0xbc, 0xa4, 0xc9, 0xec, 0x73, 0x67, 0x15, 0x70, 0x2b, 0x0, 0x89, 0x27, 0xbb, 0x61, 0x9d, 0xc7, 0xc3, 0x39, 0x46, 0x3, 0x91, 0xb7, 0x3b},
"github.com/alice/match": {0x7e, 0x10, 0x6, 0x2f, 0x8, 0x3, 0x3c, 0x76, 0xae, 0xbc, 0xa4, 0xc9, 0xec, 0x73, 0x67, 0x15, 0x70, 0x2b, 0x0, 0x89, 0x27, 0xbb, 0x61, 0x9d, 0xc7, 0xc3, 0x39, 0x46, 0x3, 0x91, 0xb7, 0x3b},
"github.com/alice/mismatch": []byte("some non-matching digest"),
"github.com/bob/emptyDigest": nil, // empty hash result
"github.com/bob/match": []byte{0x7e, 0x10, 0x6, 0x2f, 0x8, 0x3, 0x3c, 0x76, 0xae, 0xbc, 0xa4, 0xc9, 0xec, 0x73, 0x67, 0x15, 0x70, 0x2b, 0x0, 0x89, 0x27, 0xbb, 0x61, 0x9d, 0xc7, 0xc3, 0x39, 0x46, 0x3, 0x91, 0xb7, 0x3b},
"github.com/bob/match": {0x7e, 0x10, 0x6, 0x2f, 0x8, 0x3, 0x3c, 0x76, 0xae, 0xbc, 0xa4, 0xc9, 0xec, 0x73, 0x67, 0x15, 0x70, 0x2b, 0x0, 0x89, 0x27, 0xbb, 0x61, 0x9d, 0xc7, 0xc3, 0x39, 0x46, 0x3, 0x91, 0xb7, 0x3b},
"github.com/charlie/notInTree": nil, // not in tree result ought to superseede empty digest result
// matching result at seldomly found directory level
"launchpad.net/match": []byte{0x7e, 0x10, 0x6, 0x2f, 0x8, 0x3, 0x3c, 0x76, 0xae, 0xbc, 0xa4, 0xc9, 0xec, 0x73, 0x67, 0x15, 0x70, 0x2b, 0x0, 0x89, 0x27, 0xbb, 0x61, 0x9d, 0xc7, 0xc3, 0x39, 0x46, 0x3, 0x91, 0xb7, 0x3b},
"launchpad.net/match": {0x7e, 0x10, 0x6, 0x2f, 0x8, 0x3, 0x3c, 0x76, 0xae, 0xbc, 0xa4, 0xc9, 0xec, 0x73, 0x67, 0x15, 0x70, 0x2b, 0x0, 0x89, 0x27, 0xbb, 0x61, 0x9d, 0xc7, 0xc3, 0x39, 0x46, 0x3, 0x91, 0xb7, 0x3b},
}

status, err := VerifyDepTree(vendorRoot, wantSums)
Expand Down
8 changes: 4 additions & 4 deletions internal/gps/pkgtree/pkgtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ type Package struct {
// vcsRoots is a set of directories we should not descend into in ListPackages when
// searching for Go packages
var vcsRoots = map[string]struct{}{
".git": struct{}{},
".bzr": struct{}{},
".svn": struct{}{},
".hg": struct{}{},
".git": {},
".bzr": {},
".svn": {},
".hg": {},
}

// ListPackages reports Go package information about all directories in the tree
Expand Down
4 changes: 2 additions & 2 deletions internal/gps/pkgtree/pkgtree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1426,13 +1426,13 @@ func TestListPackages(t *testing.T) {
out: PackageTree{
ImportRoot: "noncanonical",
Packages: map[string]PackageOrErr{
"noncanonical": PackageOrErr{
"noncanonical": {
Err: &NonCanonicalImportRoot{
ImportRoot: "noncanonical",
Canonical: "canonical",
},
},
"noncanonical/sub": PackageOrErr{
"noncanonical/sub": {
Err: &NonCanonicalImportRoot{
ImportRoot: "noncanonical",
Canonical: "canonical/subpackage",
Expand Down
4 changes: 2 additions & 2 deletions internal/gps/prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func collectUnusedPackagesFiles(projectDir string, unusedPackages map[string]str
return nil
}

// Ignore perserved files.
// Ignore preserved files.
if isPreservedFile(info.Name()) {
return nil
}
Expand Down Expand Up @@ -242,7 +242,7 @@ func collectNonGoFiles(baseDir string, logger *log.Logger) ([]string, error) {
return nil
}

// Ignore perserved files.
// Ignore preserved files.
if isPreservedFile(info.Name()) {
return nil
}
Expand Down
6 changes: 3 additions & 3 deletions internal/gps/source_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var sanitizer = strings.NewReplacer("-", "--", ":", "-", "/", "-", "+", "-")
// interfering with one-another.
//
// Currently, anything that can either TryLock(), Unlock(), or GetOwner()
// satifies that need.
// satisfies that need.
type locker interface {
TryLock() error
Unlock() error
Expand All @@ -53,12 +53,12 @@ func (fl falseLocker) GetOwner() (*os.Process, error) {
return nil, fmt.Errorf("falseLocker always fails")
}

// Does nothing and returns a nil error so caller beleives locking succeeded.
// Does nothing and returns a nil error so caller believes locking succeeded.
func (fl falseLocker) TryLock() error {
return nil
}

// Does nothing and returns a nil error so caller beleives unlocking succeeded.
// Does nothing and returns a nil error so caller believes unlocking succeeded.
func (fl falseLocker) Unlock() error {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion internal/importers/gvt/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (g *Importer) convert(pr gps.ProjectRoot) (*dep.Manifest, *dep.Lock, error)
contstraintHint = pkg.Revision
} else if pkg.Branch != "master" {
// both gvt & gb-vendor set "branch" to "master" unless a different branch was requested.
// so it's not realy a constraint unless it's a different branch
// so it's not really a constraint unless it's a different branch
contstraintHint = pkg.Branch
}

Expand Down

0 comments on commit 84cf7b3

Please sign in to comment.