goctl

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverGoctl

func DiscoverGoctl() (string, error)

DiscoverGoctl finds the goctl executable using multiple fallback strategies Returns the absolute path to goctl or an error if not found

Types

type ExecuteResult

type ExecuteResult struct {
	Stdout   string
	Stderr   string
	ExitCode int
	Error    error
}

ExecuteResult contains the result of a goctl command execution

type Executor

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

Executor handles safe execution of goctl commands

func NewExecutor

func NewExecutor() (*Executor, error)

NewExecutor creates a new goctl executor Discovers goctl path on initialization

func (*Executor) Execute

func (e *Executor) Execute(args ...string) *ExecuteResult

Execute runs a goctl command with the given arguments Uses absolute paths and captures both stdout and stderr

func (*Executor) ExecuteInDir

func (e *Executor) ExecuteInDir(dir string, args ...string) *ExecuteResult

ExecuteInDir runs a goctl command in a specific directory

func (*Executor) GetPath

func (e *Executor) GetPath() string

GetPath returns the discovered goctl path

type Validator

type Validator struct{}

Validator validates generated code and project structure

func NewValidator

func NewValidator() *Validator

NewValidator creates a new validator instance

func (*Validator) DirectoryExists

func (v *Validator) DirectoryExists(path string) bool

DirectoryExists checks if a directory exists

func (*Validator) FileExists

func (v *Validator) FileExists(path string) bool

FileExists checks if a file exists

func (*Validator) ValidateServiceProject

func (v *Validator) ValidateServiceProject(projectPath string, serviceType string) error

ValidateServiceProject validates a generated service project Checks for required files and structure

Jump to

Keyboard shortcuts

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