Skip to content

Commit

Permalink
misspelled command names
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Nov 24, 2024
1 parent ab4aa24 commit 7a9f5b2
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions cmd/slackdump/internal/diag/encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ DKOKJRTJslrewS0MeTopOa/NUI5zC1z9GsqWBAzrbUU=
-----END PGP PUBLIC KEY BLOCK-----
`

var dmdEncrypt = &base.Command{
var cmdEncrypt = &base.Command{
Run: runEncrypt,
UsageLine: "slackdump tools encrypt [flags] file",
Short: "encrypts a file to post in github issues",
Expand Down Expand Up @@ -111,8 +111,8 @@ func init() {
if err := initRecipient(); err != nil {
panic(err)
}
dmdEncrypt.Flag.BoolVar(&gArm, "a", false, "shorthand for -armor")
dmdEncrypt.Flag.BoolVar(&gArm, "armor", false, "armor the output")
cmdEncrypt.Flag.BoolVar(&gArm, "a", false, "shorthand for -armor")
cmdEncrypt.Flag.BoolVar(&gArm, "armor", false, "armor the output")
}

func initRecipient() error {
Expand Down
12 changes: 6 additions & 6 deletions cmd/slackdump/internal/diag/eztest.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/rusq/slackdump/v3/cmd/slackdump/internal/golang/base"
)

var dmdEzTest = &base.Command{
var cmdEzTest = &base.Command{
Run: runEzLoginTest,
UsageLine: "slack tools eztest",
Short: "EZ-Login 3000 test",
Expand Down Expand Up @@ -57,13 +57,13 @@ type eztestOpts struct {
var eztestFlags eztestOpts

func init() {
dmdEzTest.Flag.Usage = func() {
cmdEzTest.Flag.Usage = func() {
fmt.Fprint(os.Stdout, "usage: slackdump tools eztest [flags]\n\nFlags:\n")
dmdEzTest.Flag.PrintDefaults()
cmdEzTest.Flag.PrintDefaults()
}
dmdEzTest.Flag.BoolVar(&eztestFlags.printCreds, "p", false, "print credentials")
dmdEzTest.Flag.BoolVar(&eztestFlags.legacy, "legacy-browser", false, "run with playwright")
dmdEzTest.Flag.StringVar(&eztestFlags.wsp, "w", "", "Slack `workspace` to login to.")
cmdEzTest.Flag.BoolVar(&eztestFlags.printCreds, "p", false, "print credentials")
cmdEzTest.Flag.BoolVar(&eztestFlags.legacy, "legacy-browser", false, "run with playwright")
cmdEzTest.Flag.StringVar(&eztestFlags.wsp, "w", "", "Slack `workspace` to login to.")
}

func runEzLoginTest(ctx context.Context, cmd *base.Command, args []string) error {
Expand Down
6 changes: 3 additions & 3 deletions cmd/slackdump/internal/diag/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/rusq/slackdump/v3/cmd/slackdump/internal/golang/base"
)

// dmdInfo is the information command.
var dmdInfo = &base.Command{
// cmdInfo is the information command.
var cmdInfo = &base.Command{
UsageLine: "slackdump tools info",
Short: "show information about Slackdump environment",
Run: runInfo,
Expand All @@ -29,7 +29,7 @@ var infoParams = struct {
}

func init() {
dmdInfo.Flag.BoolVar(&infoParams.auth, "auth", false, "show authentication diagnostic information")
cmdInfo.Flag.BoolVar(&infoParams.auth, "auth", false, "show authentication diagnostic information")
}

func runInfo(ctx context.Context, cmd *base.Command, args []string) error {
Expand Down
22 changes: 11 additions & 11 deletions cmd/slackdump/internal/diag/obfuscate.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/rusq/slackdump/v3/internal/chunk/obfuscate"
)

// dmdObfuscate is the command to obfuscate sensitive data in a slackdump
// cmdObfuscate is the command to obfuscate sensitive data in a slackdump
// recording.
var dmdObfuscate = &base.Command{
var cmdObfuscate = &base.Command{
UsageLine: "slackdump tools obfuscate [options] [input] [output]",
Short: "obfuscate sensitive data in a slackdump recording",
Long: `
Expand All @@ -36,10 +36,10 @@ var obfparam struct {
}

func init() {
dmdObfuscate.Run = runObfuscate
cmdObfuscate.Run = runObfuscate

dmdObfuscate.Flag.BoolVar(&obfparam.overwrite, "f", false, "force overwrite")
dmdObfuscate.Flag.Int64Var(&obfparam.seed, "seed", time.Now().UnixNano(), "seed for the random number generator")
cmdObfuscate.Flag.BoolVar(&obfparam.overwrite, "f", false, "force overwrite")
cmdObfuscate.Flag.Int64Var(&obfparam.seed, "seed", time.Now().UnixNano(), "seed for the random number generator")
}

const (
Expand Down Expand Up @@ -68,15 +68,15 @@ func objtype(name string) int {
}

func runObfuscate(ctx context.Context, cmd *base.Command, args []string) error {
if err := dmdObfuscate.Flag.Parse(args); err != nil {
if err := cmdObfuscate.Flag.Parse(args); err != nil {
return err
}

if dmdObfuscate.Flag.NArg() == 2 {
obfparam.input = dmdObfuscate.Flag.Arg(0)
obfparam.output = dmdObfuscate.Flag.Arg(1)
} else if dmdObfuscate.Flag.NArg() == 1 {
obfparam.input = dmdObfuscate.Flag.Arg(0)
if cmdObfuscate.Flag.NArg() == 2 {
obfparam.input = cmdObfuscate.Flag.Arg(0)
obfparam.output = cmdObfuscate.Flag.Arg(1)
} else if cmdObfuscate.Flag.NArg() == 1 {
obfparam.input = cmdObfuscate.Flag.Arg(0)
obfparam.output = "-"
} else {
obfparam.input = "-"
Expand Down
10 changes: 5 additions & 5 deletions cmd/slackdump/internal/diag/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Tools command contains different tools, running which may be requested if you op
PrintFlags: false,
RequireAuth: false,
Commands: []*base.Command{
cmdEdge,
dmdEncrypt,
dmdEzTest,
dmdInfo,
dmdObfuscate,
// cmdEdge,
cmdEncrypt,
cmdEzTest,
cmdInfo,
cmdObfuscate,
// cmdRawOutput,
cmdUninstall,
// cmdRecord,
Expand Down

0 comments on commit 7a9f5b2

Please sign in to comment.