Help us shape the future of Go! Take the 2026 Go Developer Survey

ping

package
v0.10.18 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Message string
	Color   string
	UI      bool
}

Config holds configuration for the ping command

type Executor

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

Executor handles the execution of the ping command

func NewExecutor

func NewExecutor(cfg Config, uiRunner ui.UIRunner, writer io.Writer) *Executor

NewExecutor creates a new ping command executor

func (*Executor) Execute

func (e *Executor) Execute() error

Execute runs the ping command logic

type PingResponse

type PingResponse struct {
	Message   string `json:"message"`
	Color     string `json:"color"`
	Timestamp string `json:"timestamp"`
}

PingResponse represents the structured data returned by the command This demonstrates the "Shadow Log" pattern: this struct is logged to the file while the user sees a formatted message.

Jump to

Keyboard shortcuts

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