package applyexec import ( "fmt" "os/exec" "strings" ) type Service struct{} func New() *Service { return &Service{} } func (s *Service) Apply() error { cmd := exec.Command("netplan", "apply") output, err := cmd.CombinedOutput() if err != nil { return fmt.Errorf("netplan apply failed: %s", strings.TrimSpace(string(output))) } return nil }