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

Commit

Permalink
Expand example Gopkg.toml text; always add on init
Browse files Browse the repository at this point in the history
  • Loading branch information
sdboyer committed Apr 26, 2017
1 parent 640786c commit ad41001
Show file tree
Hide file tree
Showing 15 changed files with 653 additions and 16 deletions.
41 changes: 38 additions & 3 deletions cmd/dep/testdata/harness_tests/ensure/empty/case1/final/Gopkg.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@

# Example:
## 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"

## Overrides have the same structure as [[dependencies]], but supercede all
## [[dependencies]] declarations from all projects. However, only the current
## project's overrides will apply.
##
## Overrides are a sledgehammer, and should be used only as a last resort.
# [[overrides]]
## 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"

## "required" lists a set of packages (not projects) that must be included in
## Gopkg.lock. This has the same effect as directly importing a package, but
## can be used to require "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"]
44 changes: 44 additions & 0 deletions cmd/dep/testdata/harness_tests/ensure/empty/case2/final/Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,47 @@
[[dependencies]]
name = "github.com/sdboyer/deptest"
version = "^0.8.0"

## 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 have the same structure as [[dependencies]], but supercede all
## [[dependencies]] declarations from all projects. However, only the current
## project's overrides will apply.
##
## Overrides are a sledgehammer, and should be used only as a last resort.
# [[overrides]]
## 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"

## "required" lists a set of packages (not projects) that must be included in
## Gopkg.lock. This has the same effect as directly importing a package, but
## can be used to require "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"]
44 changes: 44 additions & 0 deletions cmd/dep/testdata/harness_tests/ensure/empty/case3/final/Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,47 @@ ignored = ["github.com/sdboyer/deptestdos"]
[[dependencies]]
branch = "master"
name = "github.com/sdboyer/deptest"

## 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 have the same structure as [[dependencies]], but supercede all
## [[dependencies]] declarations from all projects. However, only the current
## project's overrides will apply.
##
## Overrides are a sledgehammer, and should be used only as a last resort.
# [[overrides]]
## 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"

## "required" lists a set of packages (not projects) that must be included in
## Gopkg.lock. This has the same effect as directly importing a package, but
## can be used to require "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"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,47 @@
[[overrides]]
name = "github.com/sdboyer/deptest"
version = "1.0.0"

## 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 have the same structure as [[dependencies]], but supercede all
## [[dependencies]] declarations from all projects. However, only the current
## project's overrides will apply.
##
## Overrides are a sledgehammer, and should be used only as a last resort.
# [[overrides]]
## 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"

## "required" lists a set of packages (not projects) that must be included in
## Gopkg.lock. This has the same effect as directly importing a package, but
## can be used to require "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"]
44 changes: 44 additions & 0 deletions cmd/dep/testdata/harness_tests/init/case1/final/Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,47 @@
[[dependencies]]
name = "github.com/sdboyer/deptestdos"
revision = "a0196baa11ea047dd65037287451d36b861b00ea"

## 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 have the same structure as [[dependencies]], but supercede all
## [[dependencies]] declarations from all projects. However, only the current
## project's overrides will apply.
##
## Overrides are a sledgehammer, and should be used only as a last resort.
# [[overrides]]
## 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"

## "required" lists a set of packages (not projects) that must be included in
## Gopkg.lock. This has the same effect as directly importing a package, but
## can be used to require "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"]
44 changes: 44 additions & 0 deletions cmd/dep/testdata/harness_tests/init/case2/final/Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,47 @@
[[dependencies]]
name = "github.com/sdboyer/deptest"
version = ">=0.8.0, <1.0.0"

## 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 have the same structure as [[dependencies]], but supercede all
## [[dependencies]] declarations from all projects. However, only the current
## project's overrides will apply.
##
## Overrides are a sledgehammer, and should be used only as a last resort.
# [[overrides]]
## 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"

## "required" lists a set of packages (not projects) that must be included in
## Gopkg.lock. This has the same effect as directly importing a package, but
## can be used to require "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"]
44 changes: 44 additions & 0 deletions cmd/dep/testdata/harness_tests/init/case3/final/Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,47 @@
[[dependencies]]
name = "github.com/sdboyer/deptestdos"
revision = "a0196baa11ea047dd65037287451d36b861b00ea"

## 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 have the same structure as [[dependencies]], but supercede all
## [[dependencies]] declarations from all projects. However, only the current
## project's overrides will apply.
##
## Overrides are a sledgehammer, and should be used only as a last resort.
# [[overrides]]
## 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"

## "required" lists a set of packages (not projects) that must be included in
## Gopkg.lock. This has the same effect as directly importing a package, but
## can be used to require "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"]
41 changes: 38 additions & 3 deletions cmd/dep/testdata/harness_tests/init/skip-hidden/final/Gopkg.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@

# Example:
## 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"

## Overrides have the same structure as [[dependencies]], but supercede all
## [[dependencies]] declarations from all projects. However, only the current
## project's overrides will apply.
##
## Overrides are a sledgehammer, and should be used only as a last resort.
# [[overrides]]
## 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"

## "required" lists a set of packages (not projects) that must be included in
## Gopkg.lock. This has the same effect as directly importing a package, but
## can be used to require "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"]
Loading

0 comments on commit ad41001

Please sign in to comment.