Skip to content

Commit

Permalink
rename "workspace" to "auth"
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Jan 1, 2024
1 parent d326798 commit 5a643fc
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package workspace
package auth

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package workspace
package auth

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package workspace
package auth

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package workspace
package auth

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package workspace
package auth

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package workspace
package auth

import "testing"

Expand Down
4 changes: 2 additions & 2 deletions cmd/slackdump/internal/format/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"github.com/slack-go/slack"

"github.com/rusq/slackdump/v2"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/auth"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/cfg"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/golang/base"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/workspace"
"github.com/rusq/slackdump/v2/internal/cache"
"github.com/rusq/slackdump/v2/internal/format"
"github.com/rusq/slackdump/v2/logger"
Expand Down Expand Up @@ -240,7 +240,7 @@ func getUsers(ctx context.Context, dmp *dump, isOnline bool) ([]slack.User, erro
}

func getUsersOnline(ctx context.Context, cacheDir, wsp string) ([]slack.User, error) {
prov, err := workspace.AuthCurrent(ctx, cacheDir, wsp)
prov, err := auth.AuthCurrent(ctx, cacheDir, wsp)
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/slackdump/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"golang.org/x/term"

"github.com/rusq/slackdump/v2/cmd/slackdump/internal/apiconfig"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/auth"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/cfg"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/convertcmd"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/diag"
Expand All @@ -31,7 +32,6 @@ import (
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/man"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/record"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/wizard"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/workspace"
"github.com/rusq/slackdump/v2/logger"
)

Expand All @@ -52,7 +52,7 @@ func init() {
convertcmd.CmdConvert,
list.CmdList,
emoji.CmdEmoji,
workspace.CmdWorkspace,
auth.CmdWorkspace,
diag.CmdDiag,
apiconfig.CmdConfig,
format.CmdFormat,
Expand Down Expand Up @@ -185,7 +185,7 @@ func invoke(cmd *base.Command, args []string) error {
if cmd.RequireAuth {
trace.Logf(ctx, "invoke", "command %s requires auth", cmd.Name())
var err error
ctx, err = workspace.AuthCurrentCtx(ctx, cfg.CacheDir(), cfg.Workspace)
ctx, err = auth.AuthCurrentCtx(ctx, cfg.CacheDir(), cfg.Workspace)
if err != nil {
trace.Logf(ctx, "invoke", "auth error: %s", err)
base.SetExitStatus(base.SAuthError)
Expand Down

0 comments on commit 5a643fc

Please sign in to comment.