mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-11 02:59:34 -06:00
[ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh
This commit is contained in:
@@ -27,8 +27,6 @@ import (
|
||||
"syscall"
|
||||
|
||||
"github.com/abiosoft/readline"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/config"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/filesys"
|
||||
sqle "github.com/dolthub/go-mysql-server"
|
||||
"github.com/dolthub/go-mysql-server/auth"
|
||||
"github.com/dolthub/go-mysql-server/sql"
|
||||
@@ -55,6 +53,8 @@ import (
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dtables"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/table/editor"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/argparser"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/config"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/filesys"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/iohelp"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/osutil"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/tracing"
|
||||
@@ -371,9 +371,9 @@ func getMultiRepoEnv(ctx context.Context, apr *argparser.ArgParseResults, dEnv *
|
||||
}
|
||||
|
||||
func execShell(
|
||||
ctx context.Context,
|
||||
mrEnv *env.MultiRepoEnv,
|
||||
format resultFormat,
|
||||
ctx context.Context,
|
||||
mrEnv *env.MultiRepoEnv,
|
||||
format resultFormat,
|
||||
) errhand.VerboseError {
|
||||
dbs, err := CollectDBs(ctx, mrEnv)
|
||||
if err != nil {
|
||||
@@ -392,11 +392,11 @@ func execShell(
|
||||
}
|
||||
|
||||
func execBatch(
|
||||
ctx context.Context,
|
||||
continueOnErr bool,
|
||||
mrEnv *env.MultiRepoEnv,
|
||||
batchInput io.Reader,
|
||||
format resultFormat,
|
||||
ctx context.Context,
|
||||
continueOnErr bool,
|
||||
mrEnv *env.MultiRepoEnv,
|
||||
batchInput io.Reader,
|
||||
format resultFormat,
|
||||
) errhand.VerboseError {
|
||||
dbs, err := CollectDBs(ctx, mrEnv)
|
||||
if err != nil {
|
||||
@@ -435,11 +435,11 @@ func execBatch(
|
||||
}
|
||||
|
||||
func execMultiStatements(
|
||||
ctx context.Context,
|
||||
continueOnErr bool,
|
||||
mrEnv *env.MultiRepoEnv,
|
||||
batchInput io.Reader,
|
||||
format resultFormat,
|
||||
ctx context.Context,
|
||||
continueOnErr bool,
|
||||
mrEnv *env.MultiRepoEnv,
|
||||
batchInput io.Reader,
|
||||
format resultFormat,
|
||||
) errhand.VerboseError {
|
||||
dbs, err := CollectDBs(ctx, mrEnv)
|
||||
if err != nil {
|
||||
@@ -472,10 +472,10 @@ func newDatabase(name string, dEnv *env.DoltEnv) dsqle.Database {
|
||||
}
|
||||
|
||||
func execQuery(
|
||||
ctx context.Context,
|
||||
mrEnv *env.MultiRepoEnv,
|
||||
query string,
|
||||
format resultFormat,
|
||||
ctx context.Context,
|
||||
mrEnv *env.MultiRepoEnv,
|
||||
query string,
|
||||
format resultFormat,
|
||||
) errhand.VerboseError {
|
||||
dbs, err := CollectDBs(ctx, mrEnv)
|
||||
if err != nil {
|
||||
@@ -1431,11 +1431,11 @@ var ErrDBNotFoundKind = errors.NewKind("database '%s' not found")
|
||||
|
||||
// sqlEngine packages up the context necessary to run sql queries against sqle.
|
||||
func newSqlEngine(
|
||||
ctx context.Context,
|
||||
config config.ReadWriteConfig,
|
||||
fs filesys.Filesys,
|
||||
format resultFormat,
|
||||
dbs ...dsqle.SqlDatabase,
|
||||
ctx context.Context,
|
||||
config config.ReadWriteConfig,
|
||||
fs filesys.Filesys,
|
||||
format resultFormat,
|
||||
dbs ...dsqle.SqlDatabase,
|
||||
) (*sqlEngine, error) {
|
||||
au := new(auth.None)
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/dolthub/dolt/go/libraries/utils/config"
|
||||
sqle "github.com/dolthub/go-mysql-server"
|
||||
"github.com/dolthub/go-mysql-server/auth"
|
||||
"github.com/dolthub/go-mysql-server/server"
|
||||
@@ -38,6 +37,7 @@ import (
|
||||
dsqle "github.com/dolthub/dolt/go/libraries/doltcore/sqle"
|
||||
_ "github.com/dolthub/dolt/go/libraries/doltcore/sqle/dfunctions"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/config"
|
||||
)
|
||||
|
||||
// Serve starts a MySQL-compatible server. Returns any errors that were encountered.
|
||||
|
||||
20
go/libraries/doltcore/env/multi_repo_env.go
vendored
20
go/libraries/doltcore/env/multi_repo_env.go
vendored
@@ -42,13 +42,13 @@ type EnvNameAndPath struct {
|
||||
// MultiRepoEnv is a type used to store multiple environments which can be retrieved by name
|
||||
type MultiRepoEnv struct {
|
||||
envs []NamedEnv
|
||||
fs filesys.Filesys
|
||||
cfg config.ReadWriteConfig
|
||||
fs filesys.Filesys
|
||||
cfg config.ReadWriteConfig
|
||||
}
|
||||
|
||||
type NamedEnv struct {
|
||||
name string
|
||||
env *DoltEnv
|
||||
env *DoltEnv
|
||||
}
|
||||
|
||||
func (mrEnv *MultiRepoEnv) FileSystem() filesys.Filesys {
|
||||
@@ -193,8 +193,8 @@ func DoltEnvAsMultiEnv(ctx context.Context, dEnv *DoltEnv) (*MultiRepoEnv, error
|
||||
|
||||
mrEnv := &MultiRepoEnv{
|
||||
envs: make([]NamedEnv, 0),
|
||||
fs: dEnv.FS,
|
||||
cfg: localCfg,
|
||||
fs: dEnv.FS,
|
||||
cfg: localCfg,
|
||||
}
|
||||
|
||||
mrEnv.AddEnv(dbName, dEnv)
|
||||
@@ -226,11 +226,11 @@ func DoltEnvAsMultiEnv(ctx context.Context, dEnv *DoltEnv) (*MultiRepoEnv, error
|
||||
// LoadMultiEnv takes a variable list of EnvNameAndPath objects loads each of the environments, and returns a new
|
||||
// MultiRepoEnv
|
||||
func LoadMultiEnv(
|
||||
ctx context.Context,
|
||||
hdp HomeDirProvider,
|
||||
fs filesys.Filesys,
|
||||
version string,
|
||||
envNamesAndPaths ...EnvNameAndPath,
|
||||
ctx context.Context,
|
||||
hdp HomeDirProvider,
|
||||
fs filesys.Filesys,
|
||||
version string,
|
||||
envNamesAndPaths ...EnvNameAndPath,
|
||||
) (*MultiRepoEnv, error) {
|
||||
nameToPath := make(map[string]string)
|
||||
for _, nameAndPath := range envNamesAndPaths {
|
||||
|
||||
@@ -20,11 +20,11 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/doltdb"
|
||||
"github.com/dolthub/go-mysql-server/enginetest"
|
||||
"github.com/dolthub/go-mysql-server/sql"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/doltdb"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/dtestutils"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/env"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle"
|
||||
|
||||
@@ -20,7 +20,6 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/dolthub/dolt/go/libraries/utils/config"
|
||||
sqle "github.com/dolthub/go-mysql-server"
|
||||
"github.com/dolthub/go-mysql-server/sql"
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -33,6 +32,7 @@ import (
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/lookup"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/sqlutil"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/table/editor"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/config"
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user