dev

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBashSafety

func CheckBashSafety(command string, cfg config.BashConfig) string

CheckBashSafety performs safety level checks Returns error message if check fails, empty string otherwise

func DetectFormatter

func DetectFormatter(path string) (formatter string, command string)

DetectFormatter detects available formatter It searches the given path and parent directories for project config files

func DetectLinter

func DetectLinter(basePath string) (linterName, checkCmd, fixCmd string)

DetectLinter detects available linter for the project

func DetectTestFramework

func DetectTestFramework(path string) (framework string, command string)

DetectTestFramework detects available test framework It searches the given path and parent directories for project config files

func ExecuteBash

func ExecuteBash(command string) string

ExecuteBash executes a shell command

func ExecuteFormat

func ExecuteFormat(path string) (string, string, error)

ExecuteFormat runs formatter with auto-detection

func ExecuteHTTPRequest

func ExecuteHTTPRequest(method, url, headers, body string, timeoutSec int) (string, error)

ExecuteHTTPRequest はHTTPリクエストを実行 method: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS url: リクエスト先URL headers: リクエストヘッダー(JSON形式) body: リクエストボディ timeout: タイムアウト秒数(デフォルト: 30)

func ExecuteLint

func ExecuteLint(path, autoFixStr string) (string, string, error)

ExecuteLint runs linter with optional auto-fix

func ExecuteRunTest

func ExecuteRunTest(path string) string

ExecuteRunTest runs tests with auto-detection

func IsSafeCommand

func IsSafeCommand(command string, cfg config.BashConfig) bool

IsSafeCommand checks if a command is safe

func RegisterTools

func RegisterTools(registry *tools.Registry)

RegisterTools registers all dev tools to the registry

Types

type BashTool

type BashTool struct{}

BashTool executes bash commands

func (*BashTool) Name

func (t *BashTool) Name() string

func (*BashTool) Run

func (t *BashTool) Run(args map[string]string) (string, *tools.FileChange, error)

type FormatTool

type FormatTool struct{}

FormatTool runs code formatter

func (*FormatTool) Name

func (t *FormatTool) Name() string

func (*FormatTool) Run

func (t *FormatTool) Run(args map[string]string) (string, *tools.FileChange, error)

type HTTPRequestTool

type HTTPRequestTool struct{}

HTTPRequestTool executes HTTP requests

func (*HTTPRequestTool) Name

func (t *HTTPRequestTool) Name() string

func (*HTTPRequestTool) Run

func (t *HTTPRequestTool) Run(args map[string]string) (string, *tools.FileChange, error)

type HTTPResponse

type HTTPResponse struct {
	StatusCode int               `json:"status_code"`
	Status     string            `json:"status"`
	Headers    map[string]string `json:"headers"`
	Body       string            `json:"body"`
	Duration   string            `json:"duration"`
}

HTTPResponse はHTTPリクエストの結果

type LintTool

type LintTool struct{}

LintTool runs linter with optional auto-fix

func (*LintTool) Name

func (t *LintTool) Name() string

func (*LintTool) Run

func (t *LintTool) Run(args map[string]string) (string, *tools.FileChange, error)

type RunTestTool

type RunTestTool struct{}

RunTestTool runs tests with auto-detection

func (*RunTestTool) Name

func (t *RunTestTool) Name() string

func (*RunTestTool) Run

func (t *RunTestTool) Run(args map[string]string) (string, *tools.FileChange, error)

Jump to

Keyboard shortcuts

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