commit | 4029241eb1d5e2e6e4196119f1f36e595deec6b1 | [log] [tgz] |
---|---|---|
author | Michael Matloob <matloob@golang.org> | Thu Jun 03 15:24:36 2021 -0400 |
committer | Michael Matloob <matloob@golang.org> | Fri Aug 27 16:34:34 2021 +0000 |
tree | 39b782fb701f65d3c53e265a78cd3358312ce9a7 | |
parent | 607370acc07b934e867b267414e276c4bbb2c991 [diff] |
[dev.cmdgo] modfile: parser changes for workfile proposal This change adds interfaces to the mod package to support parsing and representing go.work files, including WorkFile for the file as a whole, Directory for directory statements, and ParseWork for parsing go.work files. This code is mostly a lightly modified version of the parsing code for mod files. This is meant to support the workspaces proposal and if the proposal is accepted it's expected theinterface will likely change. For #45713 Change-Id: I5df6fe4acba1dbe86bc3e3fba40a04fbb4d678e4 Reviewed-on: https://go-review.googlesource.com/c/mod/+/336089 Trust: Michael Matloob <matloob@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> (cherry picked from commit e41a6a4f3b61149dd5d84af28eaf4278710af3cb) Reviewed-on: https://go-review.googlesource.com/c/mod/+/324764 Reviewed-by: Bryan C. Mills <bcmills@google.com>
This repository holds packages for writing tools that work directly with Go module mechanics. That is, it is for direct manipulation of Go modules themselves.
It is NOT about supporting general development tools that need to do things like load packages in module mode. That use case, where modules are incidental rather than the focus, should remain in x/tools, specifically x/tools/go/packages.
The specific case of loading packages should still be done by invoking the go command, which remains the single point of truth for package loading algorithms.