Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
rename [[overrides]] to [[override]]
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeweb committed May 10, 2017
1 parent bb8a327 commit c87e45d
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
## or in a dependency.
# ignored = ["github.com/user/project/badpkg"]

## Constraint define constraints on dependent projects. They are respected by
## Constraints are rules for how directly imported projects
## may be incorporated into the depgraph. They are respected by
## dep whether coming from the Gopkg.toml of the current project or a dependency.
# [[constraint]]
## Required: the root import path of the project being constrained.
Expand All @@ -27,12 +28,12 @@
## Optional: an alternate location (URL or import path) for the project's source.
# source = "https://github.com/myfork/package.git"

## Overrides have the same structure as [[constraint]], but supercede all
## Override have the same structure as [[constraint]], but supercede all
## [[constraint]] declarations from all projects. Only the current project's
## [[overrides]] are applied.
## [[override]] is applied.
##
## Overrides are a sledgehammer. Use them only as a last resort.
# [[overrides]]
## Override is a sledgehammer. Use them only as a last resort.
# [[override]]
## Required: the root import path of the project being constrained.
# name = "github.com/user/project"
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

## Overrides have the same structure as [[constraint]], but supercede all
## [[constraint]] declarations from all projects. Only the current project's
## [[overrides]] are applied.
## [[override]] are applied.
##
## Overrides are a sledgehammer. Use them only as a last resort.
# [[overrides]]
# [[override]]
## Required: the root import path of the project being constrained.
# name = "github.com/user/project"
#
Expand Down
2 changes: 1 addition & 1 deletion manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Manifest struct {

type rawManifest struct {
Constraints []rawProject `toml:"constraint,omitempty"`
Overrides []rawProject `toml:"overrides,omitempty"`
Overrides []rawProject `toml:"override,omitempty"`
Ignored []string `toml:"ignored,omitempty"`
Required []string `toml:"required,omitempty"`
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/manifest/error1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ignored = ["github.com/foo/bar"]
version = "^v0.12.0"
source = "https://github.com/golang/dep/gps"

[[overrides]]
[[override]]
name = "github.com/golang/dep/gps"
branch = "master"
revision = "d05d5aca9f895d19e9265839bffeadd74a2d2ecb"
Expand Down
2 changes: 1 addition & 1 deletion testdata/manifest/golden.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ignored = ["github.com/foo/bar"]
name = "github.com/golang/dep/gps"
version = ">=0.12.0, <1.0.0"

[[overrides]]
[[override]]
branch = "master"
name = "github.com/golang/dep/gps"
source = "https://github.com/golang/dep/gps"
29 changes: 26 additions & 3 deletions testdata/txn_writer/expected_manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
## or in a dependency.
# ignored = ["github.com/user/project/badpkg"]

## Constraint define constraints on dependent projects. They are respected by
## Constraints are rules for how directly imported projects
## may be incorporated into the depgraph. They are respected by
## dep whether coming from the Gopkg.toml of the current project or a dependency.
# [[constraint]]
## Required: the root import path of the project being constrained.
Expand All @@ -27,12 +28,34 @@
## Optional: an alternate location (URL or import path) for the project's source.
# source = "https://github.com/myfork/package.git"

## Override have the same structure as [[constraint]], but supercede all
## [[constraint]] declarations from all projects. Only the current project's
## [[override]] is applied.
##
## Override is a sledgehammer. Use them only as a last resort.
# [[override]]
## Required: the root import path of the project being constrained.
# name = "github.com/user/project"
#
## Optional: specifying a version constraint override will cause all other
## constraints on this project to be ignored; only the overriden constraint
## need be satisfied.
## Again, only one of "branch", "version" or "revision" can be specified.
# version = "1.0.0"
# branch = "master"
# revision = "abc123"
#
## Optional: specifying an alternate source location as an override will
## enforce that the alternate location is used for that project, regardless of
## what source location any dependent projects specify.
# source = "https://github.com/myfork/package.git"

## Overrides have the same structure as [[constraint]], but supercede all
## [[constraint]] declarations from all projects. Only the current project's
## [[overrides]] are applied.
## [[override]] are applied.
##
## Overrides are a sledgehammer. Use them only as a last resort.
# [[overrides]]
# [[override]]
## Required: the root import path of the project being constrained.
# name = "github.com/user/project"
#
Expand Down
11 changes: 6 additions & 5 deletions txn_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const exampleTOML = `
## or in a dependency.
# ignored = ["github.com/user/project/badpkg"]
## Constraint define constraints on dependent projects. They are respected by
## Constraints are rules for how directly imported projects
## may be incorporated into the depgraph. They are respected by
## dep whether coming from the Gopkg.toml of the current project or a dependency.
# [[constraint]]
## Required: the root import path of the project being constrained.
Expand All @@ -51,12 +52,12 @@ const exampleTOML = `
## Optional: an alternate location (URL or import path) for the project's source.
# source = "https://github.com/myfork/package.git"
## Overrides have the same structure as [[constraint]], but supercede all
## Override have the same structure as [[constraint]], but supercede all
## [[constraint]] declarations from all projects. Only the current project's
## [[overrides]] are applied.
## [[override]] is applied.
##
## Overrides are a sledgehammer. Use them only as a last resort.
# [[overrides]]
## Override is a sledgehammer. Use them only as a last resort.
# [[override]]
## Required: the root import path of the project being constrained.
# name = "github.com/user/project"
#
Expand Down

0 comments on commit c87e45d

Please sign in to comment.