Repository: dolthub/dolt
File: go/cmd/dolt/commands/admin/newgen_to_oldgen.go (Go)

Code before:
package admin

import (
	"context"
	"os"
	"sync"
	"time"

	"github.com/dolthub/dolt/go/cmd/dolt/cli"
	"github.com/dolthub/dolt/go/libraries/doltcore/doltdb"
	"github.com/dolthub/dolt/go/libraries/doltcore/env"
	"github.com/dolthub/dolt/go/libraries/utils/argparser"
	"github.com/dolthub/dolt/go/store/datas"
	"github.com/dolthub/dolt/go/store/nbs"
)

type NewGenToOldGenCmd struct {
}

func (cmd NewGenToOldGenCmd) Name() string {
	return "newgen-to-oldgen"
}

var newGenToOldGenDocs = cli.CommandDocumentationContent{
	ShortDesc: "Promote everything in newgen to oldgen. Skips GC.",
	LongDesc:  `Admin command to force the promotion of all tables in the new generation to the old generation.`,
	Synopsis:  []string{},
}

// Description returns a description of the command
func (cmd NewGenToOldGenCmd) Description() string {
	return "Admin command to move all storage from newgen to oldgen."
}
func (cmd NewGenToOldGenCmd) RequiresRepo() bool {
	return true
}
func (cmd NewGenToOldGenCmd) Docs() *cli.CommandDocumentation {
	ap := cmd.ArgParser()
	return cli.NewCommandDocumentation(newGenToOldGenDocs, ap)
}

func (cmd NewGenToOldGenCmd) ArgParser() *argparser.ArgParser {
	ap := argparser.NewArgParserWithMaxArgs(cmd.Name(), 0)
	return ap
}
func (cmd NewGenToOldGenCmd) Hidden() bool {
	return true
}

func (cmd NewGenToOldGenCmd) Exec(ctx context.Context, commandStr string, args []string, dEnv *env.DoltEnv, cliCtx cli.CliContext) int {
	db := doltdb.HackDatasDatabaseFromDoltDB(dEnv.DoltDB(ctx))

Review comment (suggestion):
```suggestion
	LongDesc:  `Admin command to force the promotion of all table files in the new generation to the old generation.`,
```

Code after:
package admin

import (
	"context"
	"os"
	"time"

	"golang.org/x/sync/errgroup"

	"github.com/dolthub/dolt/go/cmd/dolt/cli"
	"github.com/dolthub/dolt/go/libraries/doltcore/doltdb"
	"github.com/dolthub/dolt/go/libraries/doltcore/env"
	"github.com/dolthub/dolt/go/libraries/utils/argparser"
	"github.com/dolthub/dolt/go/store/datas"
	"github.com/dolthub/dolt/go/store/nbs"
)

type NewGenToOldGenCmd struct {
}

func (cmd NewGenToOldGenCmd) Name() string {
	return "newgen-to-oldgen"
}

var newGenToOldGenDocs = cli.CommandDocumentationContent{
	ShortDesc: "Promote everything in newgen to oldgen. Skips GC.",
	LongDesc:  `Admin command to force the promotion of all table files in the new generation to the old generation.`,
	Synopsis:  []string{},
}

// Description returns a description of the command
func (cmd NewGenToOldGenCmd) Description() string {
	return "Admin command to move all storage from newgen to oldgen."
}
func (cmd NewGenToOldGenCmd) RequiresRepo() bool {
	return true
}
func (cmd NewGenToOldGenCmd) Docs() *cli.CommandDocumentation {
	ap := cmd.ArgParser()
	return cli.NewCommandDocumentation(newGenToOldGenDocs, ap)
}

func (cmd NewGenToOldGenCmd) ArgParser() *argparser.ArgParser {
	ap := argparser.NewArgParserWithMaxArgs(cmd.Name(), 0)
	return ap
}
func (cmd NewGenToOldGenCmd) Hidden() bool {
	return true
}

func (cmd NewGenToOldGenCmd) Exec(ctx context.Context, _ string, _ []string, dEnv *env.DoltEnv, _ cli.CliContext) int {