1
0
mirror of https://github.com/golang/go synced 2024-11-26 07:47:57 -07:00

[dev.cmdgo] 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>
This commit is contained in:
Jay Conrod 2021-07-14 13:52:00 -07:00
parent 176baafd5b
commit 137089ffb9
26 changed files with 23 additions and 23 deletions

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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() {

View File

@ -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{

View File

@ -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"
) )

View File

@ -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{

View File

@ -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"
) )

View File

@ -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"

View File

@ -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{

View File

@ -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"

View File

@ -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.

View File

@ -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.

View File

@ -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"
) )

View File

@ -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"

View File

@ -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"

View File

@ -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{

View File

@ -31,9 +31,9 @@ import (
"cmd/go/internal/lockedfile" "cmd/go/internal/lockedfile"
"cmd/go/internal/modload" "cmd/go/internal/modload"
"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"
) )

View File

@ -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"
) )

View File

@ -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

View File

@ -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

View File

@ -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"
) )

View File

@ -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.