tools

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2025 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseToolsManager

type BaseToolsManager struct {
	// contains filtered or unexported fields
}

BaseToolsManager is the base implementation of the ToolsManager interface.

func NewToolsManager

func NewToolsManager(configHandler config.ConfigHandler, shell shell.Shell) *BaseToolsManager

NewToolsManager creates a new ToolsManager instance with the given config handler and shell.

func (*BaseToolsManager) Check

func (t *BaseToolsManager) Check() error

Check checks that appropriate tools are installed and configured.

func (*BaseToolsManager) Install

func (t *BaseToolsManager) Install() error

Install installs the tools required by the project.

func (*BaseToolsManager) WriteManifest

func (t *BaseToolsManager) WriteManifest() error

WriteManifest writes the tools manifest to the project root. It should not overwrite existing manifest files, but update them appropriately.

type MockToolsManager

type MockToolsManager struct {
	WriteManifestFunc func() error
	InstallFunc       func() error
	CheckFunc         func() error
}

MockToolsManager is a mock implementation of the ToolsManager interface for testing purposes.

func NewMockToolsManager

func NewMockToolsManager() *MockToolsManager

NewMockToolsManager creates a new instance of MockToolsManager.

func (*MockToolsManager) Check

func (m *MockToolsManager) Check() error

Check calls the mock CheckFunc if set, otherwise returns nil.

func (*MockToolsManager) Install

func (m *MockToolsManager) Install() error

InstallTools calls the mock InstallToolsFunc if set, otherwise returns nil.

func (*MockToolsManager) WriteManifest

func (m *MockToolsManager) WriteManifest() error

WriteManifest calls the mock WriteManifestFunc if set, otherwise returns nil.

type ToolsManager

type ToolsManager interface {
	WriteManifest() error
	Install() error
	Check() error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL