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

cliedit

package
v1.3.103 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package cliedit cmd/skywire-cli/commands/edit/edit.go c4-vis-cli

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:    "edit [file]",
	Short:  "Terminal text editor",
	Long:   "Small terminal text editor (Ctrl+S save, Ctrl+Q quit). In the browser shell it edits in a real text area.",
	Hidden: true,
	Args:   cobra.MaximumNArgs(1),
	Run: func(_ *cobra.Command, args []string) {
		filename := "untitled"
		var content string
		if len(args) == 1 {
			filename = args[0]
			data, err := os.ReadFile(filename)
			if err != nil && !os.IsNotExist(err) {
				cmdutil.Eprintf("edit: %v\n", err)
				cmdutil.Exit(1)
			}
			content = string(data)
		}
		if err := run(filename, content); err != nil {
			cmdutil.Eprintf("edit: %v\n", err)
			cmdutil.Exit(1)
		}
	},
}

RootCmd is the edit command

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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