Documentation
¶
Index ¶
- func BuildGitOpenRepoURI(absPath string) string
- func BuildOpenURI(absPath string, replace bool) string
- func EnsureCodeCLI() error
- func EnsureExtensionListed() error
- func OpenDir(path string, cwd string, replace bool) error
- func OpenDirOptions(path string, cwd string, opts OpenOptions) error
- func OpenGitRepo(path string, cwd string) error
- func SetCodeCommandForTest(cmd string)
- func SetExecCommandHook(hook func(name string, arg ...string) *exec.Cmd)
- func SetGOOSForTest(goos string)
- func SetIPC_SOCKETPathForTest(path string)
- func SetStderrWriterForTest(w io.Writer)
- func SetStdoutWriterForTest(w io.Writer)
- func ValidateDirPath(path string, cwd string) (string, error)
- func ValidateGitRepoPath(path string, cwd string) (string, error)
- type OpenOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildGitOpenRepoURI ¶
BuildGitOpenRepoURI constructs the vscode:// deep link for opening a git repo.
func BuildOpenURI ¶
BuildOpenURI constructs the vscode:// deep link for opening a directory.
func EnsureCodeCLI ¶
func EnsureCodeCLI() error
EnsureCodeCLI verifies the VS Code `code` CLI is available.
func EnsureExtensionListed ¶
func EnsureExtensionListed() error
EnsureExtensionListed verifies xhd2015.open-in-new-window is installed.
func OpenDirOptions ¶
func OpenDirOptions(path string, cwd string, opts OpenOptions) error
OpenDirOptions is the full open pipeline with IPC-only and JSON output options.
func OpenGitRepo ¶
OpenGitRepo validates the path, runs precheck, tries IPC, and falls back to URI.
func SetCodeCommandForTest ¶
func SetCodeCommandForTest(cmd string)
SetCodeCommandForTest overrides the code CLI path for tests. Pass empty string to reset.
func SetGOOSForTest ¶
func SetGOOSForTest(goos string)
func SetIPC_SOCKETPathForTest ¶
func SetIPC_SOCKETPathForTest(path string)
SetIPC_SOCKETPathForTest overrides the IPC socket path for tests.
func SetStderrWriterForTest ¶
SetStderrWriterForTest redirects stderr hint output for tests.
func SetStdoutWriterForTest ¶
SetStdoutWriterForTest redirects JSON stdout for tests.
func ValidateDirPath ¶
ValidateDirPath resolves path against cwd, verifies it is an existing directory, and returns the normalized absolute path.
Types ¶
type OpenOptions ¶
OpenOptions configures directory open behavior.