File tree Expand file tree Collapse file tree 7 files changed +44
-23
lines changed
cmd/slackdump/internal/workspace Expand file tree Collapse file tree 7 files changed +44
-23
lines changed Original file line number Diff line number Diff line change 1919//go:embed assets/del.md
2020var delMD string
2121
22- var CmdWspDel = & base.Command {
22+ var cmdWspDel = & base.Command {
2323 UsageLine : baseCommand + " del [flags]" ,
2424 Short : "deletes the saved workspace credentials" ,
2525 Long : delMD ,
@@ -29,11 +29,11 @@ var CmdWspDel = &base.Command{
2929}
3030
3131func init () {
32- CmdWspDel .Run = runWspDel
32+ cmdWspDel .Run = runWspDel
3333}
3434
3535var (
36- delAll = CmdWspDel .Flag .Bool ("a" , false , "delete all workspaces" )
36+ delAll = cmdWspDel .Flag .Bool ("a" , false , "delete all workspaces" )
3737)
3838
3939func runWspDel (ctx context.Context , cmd * base.Command , args []string ) error {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import (
1313//go:embed assets/import.md
1414var importMd string
1515
16- var CmdImport = & base.Command {
16+ var cmdWspImport = & base.Command {
1717 UsageLine : baseCommand + " import [flags] filename" ,
1818 Short : "import credentials from .env or secrets.txt file" ,
1919 Long : importMd ,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import (
2323//go:embed assets/list.md
2424var listMd string
2525
26- var CmdWspList = & base.Command {
26+ var cmdWspList = & base.Command {
2727 UsageLine : baseCommand + " list [flags]" ,
2828 Short : "list saved authentication information" ,
2929 Long : listMd ,
@@ -32,12 +32,12 @@ var CmdWspList = &base.Command{
3232}
3333
3434var (
35- bare = CmdWspList .Flag .Bool ("b" , false , "bare output format (just names)" )
36- all = CmdWspList .Flag .Bool ("a" , false , "all information, including user" )
35+ bare = cmdWspList .Flag .Bool ("b" , false , "bare output format (just names)" )
36+ all = cmdWspList .Flag .Bool ("a" , false , "all information, including user" )
3737)
3838
3939func init () {
40- CmdWspList .Run = runList
40+ cmdWspList .Run = runList
4141}
4242
4343func runList (ctx context.Context , cmd * base.Command , args []string ) error {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import (
1919//go:embed assets/new.md
2020var newMD string
2121
22- var CmdWspNew = & base.Command {
22+ var cmdWspNew = & base.Command {
2323 UsageLine : baseCommand + " new [flags] <name>" ,
2424 Short : "authenticate in a Slack Workspace" ,
2525 Long : newMD ,
@@ -29,9 +29,9 @@ var CmdWspNew = &base.Command{
2929}
3030
3131func init () {
32- wspcfg .SetWspFlags (& CmdWspNew .Flag )
32+ wspcfg .SetWspFlags (& cmdWspNew .Flag )
3333
34- CmdWspNew .Run = runWspNew
34+ cmdWspNew .Run = runWspNew
3535}
3636
3737// runWspNew authenticates in the new workspace.
Original file line number Diff line number Diff line change 99 "github.com/rusq/slackdump/v3/internal/cache"
1010)
1111
12- var CmdWspSelect = & base.Command {
12+ var cmdWspSelect = & base.Command {
1313 UsageLine : baseCommand + " select [flags]" ,
1414 Short : "choose a previously saved workspace" ,
1515 Long : `
@@ -32,7 +32,7 @@ To get the full list of authenticated workspaces, run:
3232}
3333
3434func init () {
35- CmdWspSelect .Run = runSelect
35+ cmdWspSelect .Run = runSelect
3636}
3737
3838func runSelect (ctx context.Context , cmd * base.Command , args []string ) error {
Original file line number Diff line number Diff line change 1+ package workspace
2+
3+ import (
4+ "github.com/rusq/slackdump/v3/cmd/slackdump/internal/cfg"
5+ "github.com/rusq/slackdump/v3/cmd/slackdump/internal/golang/base"
6+ "github.com/rusq/slackdump/v3/cmd/slackdump/internal/workspace/workspaceui"
7+ )
8+
9+ var cmdWspWiz = & base.Command {
10+ Run : workspaceui .WorkspaceNew ,
11+ UsageLine : baseCommand + " wiz [flags]" ,
12+ Short : "starts new workspace wizard" ,
13+ Long : `# Workspace Wizard
14+ Use this command to start the Workspace creation wizard.
15+
16+ The behaviour is the same as if one chooses Slackdump Wizard ==> Workspace ==> New.
17+ ` ,
18+ FlagMask : cfg .OmitAll ,
19+ PrintFlags : false ,
20+ RequireAuth : false ,
21+ HideWizard : true ,
22+ }
Original file line number Diff line number Diff line change @@ -40,22 +40,21 @@ an environment file.
4040
4141To learn more about different login options, run:
4242
43- slackdump help workspace
43+ slackdump workspace help <sub-command>
4444
4545Workspaces are stored on this device in the system Cache directory, which is
4646automatically detected to be:
47+
4748 ` + cfg .CacheDir () + `
4849` ,
49- CustomFlags : false ,
50- FlagMask : flagmask ,
51- PrintFlags : false ,
52- RequireAuth : false ,
50+ FlagMask : flagmask ,
5351 Commands : []* base.Command {
54- CmdWspNew ,
55- CmdImport ,
56- CmdWspList ,
57- CmdWspSelect ,
58- CmdWspDel ,
52+ cmdWspNew ,
53+ cmdWspImport ,
54+ cmdWspList ,
55+ cmdWspSelect ,
56+ cmdWspDel ,
57+ cmdWspWiz ,
5958 },
6059}
6160
You can’t perform that action at this time.
0 commit comments