Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd2582ed

Browse files
committed
move if to switch
1 parent4891cbf commitd2582ed

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎cli/open.go‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,10 @@ func windowsJoinPath(elem ...string) string {
290290
// If the path is being resolved within the workspace, the path will be resolved
291291
// relative to the current working directory.
292292
funcresolveAgentAbsPath(workingDirectory,relOrAbsPath,agentOSstring,localbool) (string,error) {
293-
ifrelOrAbsPath=="" {
293+
switch {
294+
caserelOrAbsPath=="":
294295
returnworkingDirectory,nil
295-
}
296296

297-
switch {
298297
caserelOrAbsPath=="~"||strings.HasPrefix(relOrAbsPath,"~/"):
299298
return"",xerrors.Errorf("path %q requires expansion and is not supported, use an absolute path instead",relOrAbsPath)
300299

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp