From f4079c9050a1f0dbf13709ac58a11b8964512995 Mon Sep 17 00:00:00 2001 From: sam boyer Date: Thu, 27 Apr 2017 21:31:58 -0400 Subject: [PATCH] Trim out/tighten up examples text --- .../ensure/empty/case1/final/Gopkg.toml | 26 +++++++------------ .../ensure/empty/case2/final/Gopkg.toml | 26 +++++++------------ .../ensure/empty/case3/final/Gopkg.toml | 26 +++++++------------ .../ensure/override/case1/final/Gopkg.toml | 26 +++++++------------ .../harness_tests/init/case1/final/Gopkg.toml | 26 +++++++------------ .../harness_tests/init/case2/final/Gopkg.toml | 26 +++++++------------ .../harness_tests/init/case3/final/Gopkg.toml | 26 +++++++------------ .../init/skip-hidden/final/Gopkg.toml | 26 +++++++------------ .../remove/force/case1/final/Gopkg.toml | 26 +++++++------------ .../remove/specific/case1/final/Gopkg.toml | 26 +++++++------------ .../remove/specific/case2/final/Gopkg.toml | 26 +++++++------------ .../remove/unused/case1/final/Gopkg.toml | 26 +++++++------------ .../status/case1/final/Gopkg.toml | 26 +++++++------------ testdata/txn_writer/expected_manifest.toml | 26 +++++++------------ txn_writer.go | 26 +++++++------------ 15 files changed, 135 insertions(+), 255 deletions(-) diff --git a/cmd/dep/testdata/harness_tests/ensure/empty/case1/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/ensure/empty/case1/final/Gopkg.toml index b6da94ea8f..88726bdefa 100644 --- a/cmd/dep/testdata/harness_tests/ensure/empty/case1/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/ensure/empty/case1/final/Gopkg.toml @@ -1,4 +1,7 @@ + +## 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. @@ -15,27 +18,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/ensure/empty/case2/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/ensure/empty/case2/final/Gopkg.toml index ebd2ce2684..aaf4b360a6 100644 --- a/cmd/dep/testdata/harness_tests/ensure/empty/case2/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/ensure/empty/case2/final/Gopkg.toml @@ -3,6 +3,9 @@ name = "github.com/sdboyer/deptest" version = "^0.8.0" + +## 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. @@ -19,27 +22,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/ensure/empty/case3/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/ensure/empty/case3/final/Gopkg.toml index 9eca018e68..98c427ddd4 100644 --- a/cmd/dep/testdata/harness_tests/ensure/empty/case3/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/ensure/empty/case3/final/Gopkg.toml @@ -4,6 +4,9 @@ ignored = ["github.com/sdboyer/deptestdos"] branch = "master" name = "github.com/sdboyer/deptest" + +## 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. @@ -20,27 +23,16 @@ ignored = ["github.com/sdboyer/deptestdos"] ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/ensure/override/case1/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/ensure/override/case1/final/Gopkg.toml index 6af7446ae0..9f8ab4c7da 100644 --- a/cmd/dep/testdata/harness_tests/ensure/override/case1/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/ensure/override/case1/final/Gopkg.toml @@ -3,6 +3,9 @@ name = "github.com/sdboyer/deptest" version = "1.0.0" + +## 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. @@ -19,27 +22,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/init/case1/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/case1/final/Gopkg.toml index bf55a9e26d..2c6d74172a 100644 --- a/cmd/dep/testdata/harness_tests/init/case1/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/init/case1/final/Gopkg.toml @@ -7,6 +7,9 @@ name = "github.com/sdboyer/deptestdos" revision = "a0196baa11ea047dd65037287451d36b861b00ea" + +## 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. @@ -23,27 +26,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/init/case2/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/case2/final/Gopkg.toml index 5d13a6095f..3603716a6a 100644 --- a/cmd/dep/testdata/harness_tests/init/case2/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/init/case2/final/Gopkg.toml @@ -3,6 +3,9 @@ name = "github.com/sdboyer/deptest" version = ">=0.8.0, <1.0.0" + +## 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. @@ -19,27 +22,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/init/case3/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/case3/final/Gopkg.toml index 0e8664c8fa..ff5104bf39 100644 --- a/cmd/dep/testdata/harness_tests/init/case3/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/init/case3/final/Gopkg.toml @@ -7,6 +7,9 @@ name = "github.com/sdboyer/deptestdos" revision = "a0196baa11ea047dd65037287451d36b861b00ea" + +## 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. @@ -23,27 +26,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/init/skip-hidden/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/skip-hidden/final/Gopkg.toml index b6da94ea8f..88726bdefa 100644 --- a/cmd/dep/testdata/harness_tests/init/skip-hidden/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/init/skip-hidden/final/Gopkg.toml @@ -1,4 +1,7 @@ + +## 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. @@ -15,27 +18,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/remove/force/case1/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/remove/force/case1/final/Gopkg.toml index 5d13a6095f..3603716a6a 100644 --- a/cmd/dep/testdata/harness_tests/remove/force/case1/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/remove/force/case1/final/Gopkg.toml @@ -3,6 +3,9 @@ name = "github.com/sdboyer/deptest" version = ">=0.8.0, <1.0.0" + +## 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. @@ -19,27 +22,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/remove/specific/case1/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/remove/specific/case1/final/Gopkg.toml index bf55a9e26d..2c6d74172a 100644 --- a/cmd/dep/testdata/harness_tests/remove/specific/case1/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/remove/specific/case1/final/Gopkg.toml @@ -7,6 +7,9 @@ name = "github.com/sdboyer/deptestdos" revision = "a0196baa11ea047dd65037287451d36b861b00ea" + +## 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. @@ -23,27 +26,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/remove/specific/case2/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/remove/specific/case2/final/Gopkg.toml index bf55a9e26d..2c6d74172a 100644 --- a/cmd/dep/testdata/harness_tests/remove/specific/case2/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/remove/specific/case2/final/Gopkg.toml @@ -7,6 +7,9 @@ name = "github.com/sdboyer/deptestdos" revision = "a0196baa11ea047dd65037287451d36b861b00ea" + +## 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. @@ -23,27 +26,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/remove/unused/case1/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/remove/unused/case1/final/Gopkg.toml index bf55a9e26d..2c6d74172a 100644 --- a/cmd/dep/testdata/harness_tests/remove/unused/case1/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/remove/unused/case1/final/Gopkg.toml @@ -7,6 +7,9 @@ name = "github.com/sdboyer/deptestdos" revision = "a0196baa11ea047dd65037287451d36b861b00ea" + +## 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. @@ -23,27 +26,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/cmd/dep/testdata/harness_tests/status/case1/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/status/case1/final/Gopkg.toml index 5d13a6095f..3603716a6a 100644 --- a/cmd/dep/testdata/harness_tests/status/case1/final/Gopkg.toml +++ b/cmd/dep/testdata/harness_tests/status/case1/final/Gopkg.toml @@ -3,6 +3,9 @@ name = "github.com/sdboyer/deptest" version = ">=0.8.0, <1.0.0" + +## 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. @@ -19,27 +22,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/testdata/txn_writer/expected_manifest.toml b/testdata/txn_writer/expected_manifest.toml index 2c31ad5289..c96351e0c9 100644 --- a/testdata/txn_writer/expected_manifest.toml +++ b/testdata/txn_writer/expected_manifest.toml @@ -3,6 +3,9 @@ name = "github.com/sdboyer/dep-test" version = "1.0.0" + +## 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. @@ -19,27 +22,16 @@ ## 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]] 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. -# [[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. +## 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 diff --git a/txn_writer.go b/txn_writer.go index 4ad3e08e84..f08d706a81 100644 --- a/txn_writer.go +++ b/txn_writer.go @@ -22,6 +22,9 @@ import ( // if no dependencies are found in the project // during `dep init` const exampleTOML = ` + +## 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. @@ -38,27 +41,16 @@ const exampleTOML = ` ## 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]] 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. -# [[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. +## 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