mirror of
https://github.com/golang/go
synced 2024-11-23 06:50:05 -07:00
cmd/internal/str: move package from cmd/go/internal/str
This will let cmd/cgo and cmd/link use this package for argument parsing. For golang/go#41400 Change-Id: I12ee21151bf3f00f3e8d427faaaab2453c823117 Reviewed-on: https://go-review.googlesource.com/c/go/+/334730 Trust: Jay Conrod <jayconrod@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/341934 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
parent
4be75faa3e
commit
4c8ffb3baa
@ -17,7 +17,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/str"
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A Command is an implementation of a go command
|
// A Command is an implementation of a go command
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/fsys"
|
"cmd/go/internal/fsys"
|
||||||
"cmd/go/internal/str"
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A StringsFlag is a command-line flag that interprets its argument
|
// A StringsFlag is a command-line flag that interprets its argument
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/load"
|
"cmd/go/internal/load"
|
||||||
"cmd/go/internal/modload"
|
"cmd/go/internal/modload"
|
||||||
"cmd/go/internal/str"
|
"cmd/internal/str"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
@ -18,7 +18,7 @@ import (
|
|||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/load"
|
"cmd/go/internal/load"
|
||||||
"cmd/go/internal/modload"
|
"cmd/go/internal/modload"
|
||||||
"cmd/go/internal/str"
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -25,8 +25,8 @@ import (
|
|||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/load"
|
"cmd/go/internal/load"
|
||||||
"cmd/go/internal/modload"
|
"cmd/go/internal/modload"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/go/internal/work"
|
"cmd/go/internal/work"
|
||||||
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
var CmdGenerate = &base.Command{
|
var CmdGenerate = &base.Command{
|
||||||
|
@ -17,10 +17,10 @@ import (
|
|||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/load"
|
"cmd/go/internal/load"
|
||||||
"cmd/go/internal/search"
|
"cmd/go/internal/search"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/go/internal/vcs"
|
"cmd/go/internal/vcs"
|
||||||
"cmd/go/internal/web"
|
"cmd/go/internal/web"
|
||||||
"cmd/go/internal/work"
|
"cmd/go/internal/work"
|
||||||
|
"cmd/internal/str"
|
||||||
|
|
||||||
"golang.org/x/mod/module"
|
"golang.org/x/mod/module"
|
||||||
)
|
)
|
||||||
|
@ -23,8 +23,8 @@ import (
|
|||||||
"cmd/go/internal/load"
|
"cmd/go/internal/load"
|
||||||
"cmd/go/internal/modinfo"
|
"cmd/go/internal/modinfo"
|
||||||
"cmd/go/internal/modload"
|
"cmd/go/internal/modload"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/go/internal/work"
|
"cmd/go/internal/work"
|
||||||
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
var CmdList = &base.Command{
|
var CmdList = &base.Command{
|
||||||
|
@ -6,7 +6,7 @@ package load
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"cmd/go/internal/base"
|
"cmd/go/internal/base"
|
||||||
"cmd/go/internal/str"
|
"cmd/internal/str"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
@ -36,8 +36,8 @@ import (
|
|||||||
"cmd/go/internal/modload"
|
"cmd/go/internal/modload"
|
||||||
"cmd/go/internal/par"
|
"cmd/go/internal/par"
|
||||||
"cmd/go/internal/search"
|
"cmd/go/internal/search"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/go/internal/trace"
|
"cmd/go/internal/trace"
|
||||||
|
"cmd/internal/str"
|
||||||
"cmd/internal/sys"
|
"cmd/internal/sys"
|
||||||
|
|
||||||
"golang.org/x/mod/modfile"
|
"golang.org/x/mod/modfile"
|
||||||
|
@ -22,8 +22,8 @@ import (
|
|||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"cmd/go/internal/fsys"
|
"cmd/go/internal/fsys"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/go/internal/trace"
|
"cmd/go/internal/trace"
|
||||||
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
var TestMainDeps = []string{
|
var TestMainDeps = []string{
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
"cmd/go/internal/imports"
|
"cmd/go/internal/imports"
|
||||||
"cmd/go/internal/load"
|
"cmd/go/internal/load"
|
||||||
"cmd/go/internal/modload"
|
"cmd/go/internal/modload"
|
||||||
"cmd/go/internal/str"
|
"cmd/internal/str"
|
||||||
|
|
||||||
"golang.org/x/mod/module"
|
"golang.org/x/mod/module"
|
||||||
"golang.org/x/mod/semver"
|
"golang.org/x/mod/semver"
|
||||||
|
@ -21,7 +21,7 @@ import (
|
|||||||
|
|
||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/lockedfile"
|
"cmd/go/internal/lockedfile"
|
||||||
"cmd/go/internal/str"
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Downloaded size limits.
|
// Downloaded size limits.
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
|
|
||||||
"cmd/go/internal/lockedfile"
|
"cmd/go/internal/lockedfile"
|
||||||
"cmd/go/internal/par"
|
"cmd/go/internal/par"
|
||||||
"cmd/go/internal/str"
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A VCSError indicates an error using a version control system.
|
// A VCSError indicates an error using a version control system.
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
"cmd/go/internal/base"
|
"cmd/go/internal/base"
|
||||||
"cmd/go/internal/modload"
|
"cmd/go/internal/modload"
|
||||||
"cmd/go/internal/search"
|
"cmd/go/internal/search"
|
||||||
"cmd/go/internal/str"
|
"cmd/internal/str"
|
||||||
|
|
||||||
"golang.org/x/mod/module"
|
"golang.org/x/mod/module"
|
||||||
)
|
)
|
||||||
|
@ -118,7 +118,7 @@ import (
|
|||||||
"cmd/go/internal/mvs"
|
"cmd/go/internal/mvs"
|
||||||
"cmd/go/internal/par"
|
"cmd/go/internal/par"
|
||||||
"cmd/go/internal/search"
|
"cmd/go/internal/search"
|
||||||
"cmd/go/internal/str"
|
"cmd/internal/str"
|
||||||
|
|
||||||
"golang.org/x/mod/module"
|
"golang.org/x/mod/module"
|
||||||
"golang.org/x/mod/semver"
|
"golang.org/x/mod/semver"
|
||||||
|
@ -21,8 +21,8 @@ import (
|
|||||||
"cmd/go/internal/imports"
|
"cmd/go/internal/imports"
|
||||||
"cmd/go/internal/modfetch"
|
"cmd/go/internal/modfetch"
|
||||||
"cmd/go/internal/search"
|
"cmd/go/internal/search"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/go/internal/trace"
|
"cmd/go/internal/trace"
|
||||||
|
"cmd/internal/str"
|
||||||
|
|
||||||
"golang.org/x/mod/module"
|
"golang.org/x/mod/module"
|
||||||
"golang.org/x/mod/semver"
|
"golang.org/x/mod/semver"
|
||||||
|
@ -18,8 +18,8 @@ import (
|
|||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/load"
|
"cmd/go/internal/load"
|
||||||
"cmd/go/internal/modload"
|
"cmd/go/internal/modload"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/go/internal/work"
|
"cmd/go/internal/work"
|
||||||
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
var CmdRun = &base.Command{
|
var CmdRun = &base.Command{
|
||||||
|
@ -30,9 +30,9 @@ import (
|
|||||||
"cmd/go/internal/load"
|
"cmd/go/internal/load"
|
||||||
"cmd/go/internal/lockedfile"
|
"cmd/go/internal/lockedfile"
|
||||||
"cmd/go/internal/search"
|
"cmd/go/internal/search"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/go/internal/trace"
|
"cmd/go/internal/trace"
|
||||||
"cmd/go/internal/work"
|
"cmd/go/internal/work"
|
||||||
|
"cmd/internal/str"
|
||||||
"cmd/internal/test2json"
|
"cmd/internal/test2json"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ import (
|
|||||||
"cmd/go/internal/base"
|
"cmd/go/internal/base"
|
||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/search"
|
"cmd/go/internal/search"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/go/internal/web"
|
"cmd/go/internal/web"
|
||||||
|
"cmd/internal/str"
|
||||||
|
|
||||||
"golang.org/x/mod/module"
|
"golang.org/x/mod/module"
|
||||||
)
|
)
|
||||||
|
@ -15,8 +15,8 @@ import (
|
|||||||
"cmd/go/internal/cache"
|
"cmd/go/internal/cache"
|
||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/fsys"
|
"cmd/go/internal/fsys"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/internal/buildid"
|
"cmd/internal/buildid"
|
||||||
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Build IDs
|
// Build IDs
|
||||||
|
@ -34,8 +34,8 @@ import (
|
|||||||
"cmd/go/internal/fsys"
|
"cmd/go/internal/fsys"
|
||||||
"cmd/go/internal/load"
|
"cmd/go/internal/load"
|
||||||
"cmd/go/internal/modload"
|
"cmd/go/internal/modload"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/go/internal/trace"
|
"cmd/go/internal/trace"
|
||||||
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
// actionList returns the list of actions in the dag rooted at root
|
// actionList returns the list of actions in the dag rooted at root
|
||||||
|
@ -20,8 +20,8 @@ import (
|
|||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/fsys"
|
"cmd/go/internal/fsys"
|
||||||
"cmd/go/internal/load"
|
"cmd/go/internal/load"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/internal/objabi"
|
"cmd/internal/objabi"
|
||||||
|
"cmd/internal/str"
|
||||||
"cmd/internal/sys"
|
"cmd/internal/sys"
|
||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
)
|
)
|
||||||
|
@ -16,8 +16,8 @@ import (
|
|||||||
"cmd/go/internal/cfg"
|
"cmd/go/internal/cfg"
|
||||||
"cmd/go/internal/fsys"
|
"cmd/go/internal/fsys"
|
||||||
"cmd/go/internal/load"
|
"cmd/go/internal/load"
|
||||||
"cmd/go/internal/str"
|
|
||||||
"cmd/internal/pkgpath"
|
"cmd/internal/pkgpath"
|
||||||
|
"cmd/internal/str"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The Gccgo toolchain.
|
// The Gccgo toolchain.
|
||||||
|
Loading…
Reference in New Issue
Block a user