An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 9.0% on proxy.golang.org
Top 4.2% dependent packages on proxy.golang.org
Top 4.7% dependent repos on proxy.golang.org
Top 0.6% docker downloads on proxy.golang.org

proxy.golang.org : github.com/confluentinc/go-editor

Package editor allows your CLI users to edit arbitrary data in their preferred editor. It's just like editing messages in "git commit" or resources with "kubectl edit". The most basic usage is to prompt the user to edit an existing file. This may be useful to edit the application configuration or a system file, for example. Most of the time, the data you want your user to edit isn't in an local file. In these cases, if you can represent your data in a human editable format (txt, yaml, hcl, json, etc), then go-editor will enable the user to edit it. Provide any "io.Reader" with the initial contents: The library leaves it up to you to cleanup the temp file. This enables your CLI to validate the edited data and prompt the user to continue editing where they left off, rather than starting over. And if that's what you want... If you would like to validate the edited data, use a ValidatingEditor instead. This will prompt the user to continue editing until validation succeeds or the edit is cancelled. Simply create a schema and pass it to the editor: A schema must implement the Schema interface: https://godoc.org/github.com/confluentinc/go-editor#Schema

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/confluentinc/go-editor
License: Apache-2.0
Latest release: over 2 years ago
First release: almost 7 years ago
Namespace: github.com/confluentinc
Dependent packages: 4
Dependent repositories: 1
Stars: 2 on GitHub
Forks: 0 on GitHub
Docker dependents: 14
Docker downloads: 582,580
See more repository details: repos.ecosyste.ms
Last synced: 3 days ago

    Loading...
    Readme
    Loading...