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

Expand example Gopkg.toml text; always add on init #462

Merged
merged 5 commits into from
Apr 28, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

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/

## 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
@@ -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"
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@

## 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"]


ignored = ["github.com/sdboyer/deptestdos"]

[[dependencies]]
Expand Down
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 cmd/dep/testdata/harness_tests/init/case1/final/Gopkg.toml
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"
Expand Down
37 changes: 37 additions & 0 deletions cmd/dep/testdata/harness_tests/init/case2/final/Gopkg.toml
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 cmd/dep/testdata/harness_tests/init/case3/final/Gopkg.toml
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]]
branch = "master"
name = "github.com/sdboyer/deptest"
Expand Down
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"]


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"
Loading