Skip to content

Commit

Permalink
Rename to addTenant
Browse files Browse the repository at this point in the history
  • Loading branch information
cyx committed Jan 25, 2021
1 parent c0edbaf commit a15c820
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ func (c *cli) getTenant() (tenant, error) {
return t, nil
}

// setTenant assigns an existing, or new tenant. This is expected to be called
// addTenant assigns an existing, or new tenant. This is expected to be called
// after a login has completed.
func (c *cli) setTenant(ten tenant) error {
func (c *cli) addTenant(ten tenant) error {
// init will fail here with a `no tenant found` error if we're logging
// in for the first time and that's expected.
_ = c.init()
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func loginCmd(cli *cli) *cobra.Command {
cli.renderer.Infof("Successfully logged in.")
cli.renderer.Infof("Tenant: %s", res.Tenant)

return cli.setTenant(tenant{
return cli.addTenant(tenant{
Name: res.Tenant,
Domain: res.Domain,
AccessToken: res.AccessToken,
Expand Down

0 comments on commit a15c820

Please sign in to comment.