github.com/fibonacci1729/glide@v0.0.0-20160513190140-d9640dc62d0f/cfg/cfg.go (about) 1 // Package cfg handles working with the Glide configuration files. 2 // 3 // The cfg package contains the ability to parse (unmarshal) and write (marshal) 4 // glide.yaml and glide.lock files. These files contains the details about 5 // projects managed by Glide. 6 // 7 // To convert yaml into a cfg.Config instance use the cfg.ConfigFromYaml function. 8 // The yaml, typically in a glide.yaml file, has the following structure. 9 // 10 // package: github.com/Masterminds/glide 11 // homepage: https://masterminds.github.io/glide 12 // license: MIT 13 // owners: 14 // - name: Matt Butcher 15 // email: technosophos@gmail.com 16 // homepage: http://technosophos.com 17 // - name: Matt Farina 18 // email: matt@mattfarina.com 19 // homepage: https://www.mattfarina.com 20 // ignore: 21 // - appengine 22 // excludeDirs: 23 // - node_modules 24 // import: 25 // - package: gopkg.in/yaml.v2 26 // - package: github.com/Masterminds/vcs 27 // version: ^1.2.0 28 // repo: git@github.com:Masterminds/vcs 29 // vcs: git 30 // - package: github.com/codegangsta/cli 31 // - package: github.com/Masterminds/semver 32 // version: ^1.0.0 33 // 34 // These elements are: 35 // 36 // - package: The top level package is the location in the GOPATH. This is used 37 // for things such as making sure an import isn't also importing the top level 38 // package. 39 // - homepage: To find the place where you can find details about the package or 40 // applications. For example, http://k8s.io 41 // - license: The license is either an SPDX license string or the filepath to the 42 // license. This allows automation and consumers to easily identify the license. 43 // - owners: The owners is a list of one or more owners for the project. This 44 // can be a person or organization and is useful for things like notifying the 45 // owners of a security issue without filing a public bug. 46 // - ignore: A list of packages for Glide to ignore importing. These are package 47 // names to ignore rather than directories. 48 // - excludeDirs: A list of directories in the local codebase to exclude from 49 // scanning for dependencies. 50 // - import: A list of packages to import. Each package can include: 51 // - package: The name of the package to import and the only non-optional item. 52 // - version: A semantic version, semantic version range, branch, tag, or 53 // commit id to use. 54 // - repo: If the package name isn't the repo location or this is a private 55 // repository it can go here. The package will be checked out from the 56 // repo and put where the package name specifies. This allows using forks. 57 // - vcs: A VCS to use such as git, hg, bzr, or svn. This is only needed 58 // when the type cannot be detected from the name. For example, a repo 59 // ending in .git or on GitHub can be detected to be Git. For a repo on 60 // Bitbucket we can contact the API to discover the type. 61 // - devImport: A list of development packages. Each package has the same details 62 // as those listed under import. 63 package cfg