Repository navigation
refactor: remove unused IsTeamID function #706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ type TeamInfo struct { | |
| Name string `json:"name"` | ||
| } | ||
|
|
||
| // IsTeamID returns true if matches the pattern of a workspace (T-prefixed) team ID | ||
| // IsWorkspaceTeamID returns true if a string matches the pattern of a workspace (T-prefixed) team ID | ||
| // Note: This criteria is an estimate, and not directly related to server-side team_id scheme | ||
| func IsWorkspaceTeamID(str string) bool { | ||
| return strings.HasPrefix(str, "T") && strings.ToUpper(str) == str | ||
|
|
@@ -51,9 +51,3 @@ func IsWorkspaceTeamID(str string) bool { | |
| func IsEnterpriseTeamID(str string) bool { | ||
| return strings.HasPrefix(str, "E") && strings.ToUpper(str) == str | ||
| } | ||
|
|
||
| // IsTeamID returns true if a string matches the pattern of a team id | ||
| // Note: Validation criteria is an estimate, and not directly related to server-side team_id scheme | ||
| func IsTeamID(str string) bool { | ||
| return IsEnterpriseTeamID(str) || IsWorkspaceTeamID(str) | ||
| } | ||
|
Comment on lines
-55
to
-59
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: I'm surprised that we don't use this helper function. At this point, the CLI broadly supports Standalone Workspace Teams, Enterprise Orgs, and OrgWorkspace (whew, what a mouthful of names). If we haven't used this helper yet, then perhaps we don't need it.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed that there's no use for it now. It was last used in #158. For the existing code, the org and org-workspace checks need to tell the ID types apart, so they need |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: Fixing an incorrect Godoc