Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirHandler ¶
type Displayer ¶
type Displayer interface { SetVerbose(bool) WroteDirectoriesInFile(wrote []string, file string, dir string) }
Displayer should not return errors, it should always display something and execution should not depend on display succeeding
type ReturnToDirMethod ¶
type ReturnToDirMethod func() error
Sent with a method that changes current directory, call to return to the previous directory, equivalent to `cd -`
type RunWith ¶
type RunWith interface { /* Runs the command with dir being the absolute path for every folder defined in a workspace */ Absolute() error /* Runs the command with dir being the relative path for every folder defined in a workspace */ Relative() error /* Runs the command with dir being the absolute path for every folder defined in the workspace's directory */ Root() error }
type Runtime ¶
type Runtime interface { Execute(name string, args ...string) error DisplayExec(name string, args ...string) ExecuteInDir(dir, name string, args ...string) error ExecuteCapture(name string, args ...string) (out, errOut string, err error) ExecuteCaptureInDir(dir, name string, args ...string) (out, errOut string, err error) WriteFile(name string, data []byte, perm fs.FileMode) error RemoveAll(path string) error Remove(path string) error Chdir(dir string) (r ReturnToDirMethod, err error) RemoveIfExist(fileName string) (removed bool) // Exported CLI commands Bool(string) bool Dry() bool SetContext(ctx *cli.Context) }
type VsWorkspace ¶
type VsWorkspace struct { Folders []VsFolder `json:"folders"` Settings map[string]interface{} `json:"settings"` }
{ "folders": [ { "path": "dreamland-cli" } ], "settings": {} }
func (VsWorkspace) List ¶
func (ws VsWorkspace) List() []string
type WorkSpaceHandler ¶
type WorkSpaceHandler func(vs *VsWorkspace) error
type Workspace ¶
type Workspace interface { Stat() error Delete() error /* Defines a runWith for running commands asynchronously */ ForEach(DirHandler) RunWith Loc() string Dir() string FileName() string Read() (VsWorkspace, error) Write(vs VsWorkspace) error Edit(WorkSpaceHandler) error New() error OpenWithCode() error AddUse(dir string) error RemoveUse(dir string) error List() ([]string, error) RelativeTo(dir string) (string, error) }
Click to show internal directories.
Click to hide internal directories.