This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand example Gopkg.toml text; always add on init #462
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ad41001
Expand example Gopkg.toml text; always add on init
sdboyer f4079c9
Trim out/tighten up examples text
sdboyer c070fbe
Put the examples at the top instead
sdboyer 99f7861
Polish text some more
sdboyer f861939
More tweaks based on review
sdboyer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
36 changes: 32 additions & 4 deletions
36
cmd/dep/testdata/harness_tests/ensure/empty/case1/final/Gopkg.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,37 @@ | ||
|
||
# Example: | ||
## EXAMPLES & DOCS - safe to delete! | ||
# | ||
## Dependencies define constraints on how dependent projects should be | ||
## incorporated into Gopkg.lock. They are respected by dep whether | ||
## this project is the current project, or if it's a dependency. | ||
# [[dependencies]] | ||
## Required: the root import path of the project being constrained | ||
# name = "github.com/user/project" | ||
## Optional: an alternate location (URL or import path) for the project's source | ||
# source = "https://github.com/myfork/package.git" | ||
## Optional, but recommended: the version constraint to enforce for the project. | ||
## Only one of "branch", "version" or "revision" can be specified. | ||
# version = "1.0.0" | ||
# branch = "master" | ||
# name = "github.com/vendor/package" | ||
# Note: revision will depend on your repository type, i.e git, svc, bzr etc... | ||
## Note: revision will depend on your repository type; git and hg have SHA1s, | ||
## bzr a 3-part id, svn a revision number. | ||
# revision = "abc123" | ||
# version = "1.0.0" | ||
# | ||
## [[overrides]] follow the exact same structure as [[dependencies]], but supercede | ||
## all [[dependencies]] declarations from all projects. Only the current project's | ||
## [[overrides]] are applied. | ||
## | ||
## Overrides are a sledgehammer, and should be used only as a last resort. | ||
# | ||
## "required" lists a set of packages (not projects) that must be included in | ||
## Gopkg.lock. This list is merged with the set of packages imported by the current | ||
## project. Use it when your project needs a package it doesn't explicitly import - | ||
## including "main" packages. | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
# | ||
## "ignored" lists a set of packages (not projects) that are ignored when | ||
## dep statically analyzes source code. Ignored packages can be in this project, | ||
## or in a dependency. | ||
# ignored = ["github.com/user/project/badpkg"] | ||
|
||
|
37 changes: 37 additions & 0 deletions
37
cmd/dep/testdata/harness_tests/ensure/empty/case2/final/Gopkg.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,41 @@ | ||
|
||
## EXAMPLES & DOCS - safe to delete! | ||
# | ||
## Dependencies define constraints on how dependent projects should be | ||
## incorporated into Gopkg.lock. They are respected by dep whether | ||
## this project is the current project, or if it's a dependency. | ||
# [[dependencies]] | ||
## Required: the root import path of the project being constrained | ||
# name = "github.com/user/project" | ||
## Optional: an alternate location (URL or import path) for the project's source | ||
# source = "https://github.com/myfork/package.git" | ||
## Optional, but recommended: the version constraint to enforce for the project. | ||
## Only one of "branch", "version" or "revision" can be specified. | ||
# version = "1.0.0" | ||
# branch = "master" | ||
## Note: revision will depend on your repository type; git and hg have SHA1s, | ||
## bzr a 3-part id, svn a revision number. | ||
# revision = "abc123" | ||
# | ||
## [[overrides]] follow the exact same structure as [[dependencies]], but supercede | ||
## all [[dependencies]] declarations from all projects. Only the current project's | ||
## [[overrides]] are applied. | ||
## | ||
## Overrides are a sledgehammer, and should be used only as a last resort. | ||
# | ||
## "required" lists a set of packages (not projects) that must be included in | ||
## Gopkg.lock. This list is merged with the set of packages imported by the current | ||
## project. Use it when your project needs a package it doesn't explicitly import - | ||
## including "main" packages. | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
# | ||
## "ignored" lists a set of packages (not projects) that are ignored when | ||
## dep statically analyzes source code. Ignored packages can be in this project, | ||
## or in a dependency. | ||
# ignored = ["github.com/user/project/badpkg"] | ||
|
||
|
||
|
||
[[dependencies]] | ||
name = "github.com/sdboyer/deptest" | ||
version = "^0.8.0" |
37 changes: 37 additions & 0 deletions
37
cmd/dep/testdata/harness_tests/ensure/empty/case3/final/Gopkg.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
cmd/dep/testdata/harness_tests/ensure/override/case1/final/Gopkg.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,41 @@ | ||
|
||
## EXAMPLES & DOCS - safe to delete! | ||
# | ||
## Dependencies define constraints on how dependent projects should be | ||
## incorporated into Gopkg.lock. They are respected by dep whether | ||
## this project is the current project, or if it's a dependency. | ||
# [[dependencies]] | ||
## Required: the root import path of the project being constrained | ||
# name = "github.com/user/project" | ||
## Optional: an alternate location (URL or import path) for the project's source | ||
# source = "https://github.com/myfork/package.git" | ||
## Optional, but recommended: the version constraint to enforce for the project. | ||
## Only one of "branch", "version" or "revision" can be specified. | ||
# version = "1.0.0" | ||
# branch = "master" | ||
## Note: revision will depend on your repository type; git and hg have SHA1s, | ||
## bzr a 3-part id, svn a revision number. | ||
# revision = "abc123" | ||
# | ||
## [[overrides]] follow the exact same structure as [[dependencies]], but supercede | ||
## all [[dependencies]] declarations from all projects. Only the current project's | ||
## [[overrides]] are applied. | ||
## | ||
## Overrides are a sledgehammer, and should be used only as a last resort. | ||
# | ||
## "required" lists a set of packages (not projects) that must be included in | ||
## Gopkg.lock. This list is merged with the set of packages imported by the current | ||
## project. Use it when your project needs a package it doesn't explicitly import - | ||
## including "main" packages. | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
# | ||
## "ignored" lists a set of packages (not projects) that are ignored when | ||
## dep statically analyzes source code. Ignored packages can be in this project, | ||
## or in a dependency. | ||
# ignored = ["github.com/user/project/badpkg"] | ||
|
||
|
||
|
||
[[overrides]] | ||
name = "github.com/sdboyer/deptest" | ||
version = "1.0.0" |
37 changes: 37 additions & 0 deletions
37
cmd/dep/testdata/harness_tests/init/case1/final/Gopkg.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
cmd/dep/testdata/harness_tests/init/case2/final/Gopkg.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,41 @@ | ||
|
||
## EXAMPLES & DOCS - safe to delete! | ||
# | ||
## Dependencies define constraints on how dependent projects should be | ||
## incorporated into Gopkg.lock. They are respected by dep whether | ||
## this project is the current project, or if it's a dependency. | ||
# [[dependencies]] | ||
## Required: the root import path of the project being constrained | ||
# name = "github.com/user/project" | ||
## Optional: an alternate location (URL or import path) for the project's source | ||
# source = "https://github.com/myfork/package.git" | ||
## Optional, but recommended: the version constraint to enforce for the project. | ||
## Only one of "branch", "version" or "revision" can be specified. | ||
# version = "1.0.0" | ||
# branch = "master" | ||
## Note: revision will depend on your repository type; git and hg have SHA1s, | ||
## bzr a 3-part id, svn a revision number. | ||
# revision = "abc123" | ||
# | ||
## [[overrides]] follow the exact same structure as [[dependencies]], but supercede | ||
## all [[dependencies]] declarations from all projects. Only the current project's | ||
## [[overrides]] are applied. | ||
## | ||
## Overrides are a sledgehammer, and should be used only as a last resort. | ||
# | ||
## "required" lists a set of packages (not projects) that must be included in | ||
## Gopkg.lock. This list is merged with the set of packages imported by the current | ||
## project. Use it when your project needs a package it doesn't explicitly import - | ||
## including "main" packages. | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
# | ||
## "ignored" lists a set of packages (not projects) that are ignored when | ||
## dep statically analyzes source code. Ignored packages can be in this project, | ||
## or in a dependency. | ||
# ignored = ["github.com/user/project/badpkg"] | ||
|
||
|
||
|
||
[[dependencies]] | ||
name = "github.com/sdboyer/deptest" | ||
version = ">=0.8.0, <1.0.0" |
37 changes: 37 additions & 0 deletions
37
cmd/dep/testdata/harness_tests/init/case3/final/Gopkg.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 32 additions & 4 deletions
36
cmd/dep/testdata/harness_tests/init/skip-hidden/final/Gopkg.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,37 @@ | ||
|
||
# Example: | ||
## EXAMPLES & DOCS - safe to delete! | ||
# | ||
## Dependencies define constraints on how dependent projects should be | ||
## incorporated into Gopkg.lock. They are respected by dep whether | ||
## this project is the current project, or if it's a dependency. | ||
# [[dependencies]] | ||
## Required: the root import path of the project being constrained | ||
# name = "github.com/user/project" | ||
## Optional: an alternate location (URL or import path) for the project's source | ||
# source = "https://github.com/myfork/package.git" | ||
## Optional, but recommended: the version constraint to enforce for the project. | ||
## Only one of "branch", "version" or "revision" can be specified. | ||
# version = "1.0.0" | ||
# branch = "master" | ||
# name = "github.com/vendor/package" | ||
# Note: revision will depend on your repository type, i.e git, svc, bzr etc... | ||
## Note: revision will depend on your repository type; git and hg have SHA1s, | ||
## bzr a 3-part id, svn a revision number. | ||
# revision = "abc123" | ||
# version = "1.0.0" | ||
# | ||
## [[overrides]] follow the exact same structure as [[dependencies]], but supercede | ||
## all [[dependencies]] declarations from all projects. Only the current project's | ||
## [[overrides]] are applied. | ||
## | ||
## Overrides are a sledgehammer, and should be used only as a last resort. | ||
# | ||
## "required" lists a set of packages (not projects) that must be included in | ||
## Gopkg.lock. This list is merged with the set of packages imported by the current | ||
## project. Use it when your project needs a package it doesn't explicitly import - | ||
## including "main" packages. | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
# | ||
## "ignored" lists a set of packages (not projects) that are ignored when | ||
## dep statically analyzes source code. Ignored packages can be in this project, | ||
## or in a dependency. | ||
# ignored = ["github.com/user/project/badpkg"] | ||
|
||
|
37 changes: 37 additions & 0 deletions
37
cmd/dep/testdata/harness_tests/remove/force/case1/final/Gopkg.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,41 @@ | ||
|
||
## EXAMPLES & DOCS - safe to delete! | ||
# | ||
## Dependencies define constraints on how dependent projects should be | ||
## incorporated into Gopkg.lock. They are respected by dep whether | ||
## this project is the current project, or if it's a dependency. | ||
# [[dependencies]] | ||
## Required: the root import path of the project being constrained | ||
# name = "github.com/user/project" | ||
## Optional: an alternate location (URL or import path) for the project's source | ||
# source = "https://github.com/myfork/package.git" | ||
## Optional, but recommended: the version constraint to enforce for the project. | ||
## Only one of "branch", "version" or "revision" can be specified. | ||
# version = "1.0.0" | ||
# branch = "master" | ||
## Note: revision will depend on your repository type; git and hg have SHA1s, | ||
## bzr a 3-part id, svn a revision number. | ||
# revision = "abc123" | ||
# | ||
## [[overrides]] follow the exact same structure as [[dependencies]], but supercede | ||
## all [[dependencies]] declarations from all projects. Only the current project's | ||
## [[overrides]] are applied. | ||
## | ||
## Overrides are a sledgehammer, and should be used only as a last resort. | ||
# | ||
## "required" lists a set of packages (not projects) that must be included in | ||
## Gopkg.lock. This list is merged with the set of packages imported by the current | ||
## project. Use it when your project needs a package it doesn't explicitly import - | ||
## including "main" packages. | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
# | ||
## "ignored" lists a set of packages (not projects) that are ignored when | ||
## dep statically analyzes source code. Ignored packages can be in this project, | ||
## or in a dependency. | ||
# ignored = ["github.com/user/project/badpkg"] | ||
|
||
|
||
|
||
[[dependencies]] | ||
name = "github.com/sdboyer/deptest" | ||
version = ">=0.8.0, <1.0.0" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/ignored when/ignored completely when/