github.com/golang/dep@v0.5.4/cmd/dep/doc.go (about)

     1  // Copyright 2017 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // DO NOT EDIT THIS FILE. GENERATED BY mkdoc.sh.
     6  // Edit the documentation in other files and rerun mkdoc.sh to generate this one.
     7  
     8  // Dep is a tool for managing dependencies for Go projects
     9  //
    10  // Usage: "dep [command]"
    11  //
    12  // Commands:
    13  //
    14  //   init     Initialize a new project with manifest and lock files
    15  //   status   Report the status of the project's dependencies
    16  //   ensure   Ensure a dependency is safely vendored in the project
    17  //   prune    Prune the vendor tree of unused packages
    18  //   version  Show the dep version information
    19  //
    20  // Examples:
    21  //   dep init                               set up a new project
    22  //   dep ensure                             install the project's dependencies
    23  //   dep ensure -update                     update the locked versions of all dependencies
    24  //   dep ensure -add github.com/pkg/errors  add a dependency to the project
    25  //
    26  // Use "dep help [command]" for more information about a command.
    27  //
    28  // Initialize a new project with manifest and lock files
    29  //
    30  // Usage:
    31  //
    32  //  init [root]
    33  //
    34  // Initialize the project at filepath root by parsing its dependencies, writing
    35  // manifest and lock files, and vendoring the dependencies. If root isn't
    36  // specified, use the current directory.
    37  //
    38  // When configuration for another dependency management tool is detected, it is
    39  // imported into the initial manifest and lock. Use the -skip-tools flag to
    40  // disable this behavior. The following external tools are supported:
    41  // glide, godep, vndr, govend, gb, gvt, glock.
    42  //
    43  // Any dependencies that are not constrained by external configuration use the
    44  // GOPATH analysis below.
    45  //
    46  // By default, the dependencies are resolved over the network. A version will be
    47  // selected from the versions available from the upstream source per the following
    48  // algorithm:
    49  //
    50  //  - Tags conforming to semver (sorted by semver rules)
    51  //  - Default branch(es) (sorted lexicographically)
    52  //  - Non-semver tags (sorted lexicographically)
    53  //
    54  // An alternate mode can be activated by passing -gopath. In this mode, the version
    55  // of each dependency will reflect the current state of the GOPATH. If a dependency
    56  // doesn't exist in the GOPATH, a version will be selected based on the above
    57  // network version selection algorithm.
    58  //
    59  // A Gopkg.toml file will be written with inferred version constraints for all
    60  // direct dependencies. Gopkg.lock will be written with precise versions, and
    61  // vendor/ will be populated with the precise versions written to Gopkg.lock.
    62  //
    63  //
    64  // Report the status of the project's dependencies
    65  //
    66  // Usage:
    67  //
    68  //  status [package...]
    69  //
    70  // With no arguments, print the status of each dependency of the project.
    71  //
    72  //   PROJECT     Import path
    73  //   CONSTRAINT  Version constraint, from the manifest
    74  //   VERSION     Version chosen, from the lock
    75  //   REVISION    VCS revision of the chosen version
    76  //   LATEST      Latest VCS revision available
    77  //   PKGS USED   Number of packages from this project that are actually used
    78  //
    79  // With one or more explicitly specified packages, or with the -detailed flag,
    80  // print an extended status output for each dependency of the project.
    81  //
    82  //   TODO    Another column description
    83  //   FOOBAR  Another column description
    84  //
    85  // Status returns exit code zero if all dependencies are in a "good state".
    86  //
    87  //
    88  // Ensure a dependency is safely vendored in the project
    89  //
    90  // Usage:
    91  //
    92  //  ensure [-update | -add] [-no-vendor | -vendor-only] [-dry-run] [<spec>...]
    93  //
    94  // Project spec:
    95  //
    96  //   <import path>[:alt source URL][@<constraint>]
    97  //
    98  //
    99  // Ensure gets a project into a complete, reproducible, and likely compilable state:
   100  //
   101  //   * All non-stdlib imports are fulfilled
   102  //   * All rules in Gopkg.toml are respected
   103  //   * Gopkg.lock records precise versions for all dependencies
   104  //   * vendor/ is populated according to Gopkg.lock
   105  //
   106  // Ensure has fast techniques to determine that some of these steps may be
   107  // unnecessary. If that determination is made, ensure may skip some steps. Flags
   108  // may be passed to bypass these checks; -vendor-only will allow an out-of-date
   109  // Gopkg.lock to populate vendor/, and -no-vendor will update Gopkg.lock (if
   110  // needed), but never touch vendor/.
   111  //
   112  // The effect of passing project spec arguments varies slightly depending on the
   113  // combination of flags that are passed.
   114  //
   115  //
   116  // Examples:
   117  //
   118  //   dep ensure                                 Populate vendor from existing Gopkg.toml and Gopkg.lock
   119  //   dep ensure -add github.com/pkg/foo         Introduce a named dependency at its newest version
   120  //   dep ensure -add github.com/pkg/foo@^1.0.1  Introduce a named dependency with a particular constraint
   121  //
   122  // For more detailed usage examples, see dep ensure -examples.
   123  //
   124  //
   125  // Prune the vendor tree of unused packages
   126  //
   127  // Usage:
   128  //
   129  //  prune
   130  //
   131  // Prune is used to remove unused packages from your vendor tree.
   132  //
   133  // STABILITY NOTICE: this command creates problems for vendor/ verification. As
   134  // such, it may be removed and/or moved out into a separate project later on.
   135  //
   136  //
   137  // Show the dep version information
   138  //
   139  // Usage:
   140  //
   141  //  version
   142  //
   143  package main