Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maxinehazel/goin

go package to get user input from an editor
https://github.com/maxinehazel/goin

editors go golang input vim

Last synced: about 2 months ago
JSON representation

go package to get user input from an editor

Awesome Lists containing this project

README

        

# Goin

Small go package for reading user input from an editor. Useful for building
CLIs and the like.

Currently supports vim but I am going to expand it to use a generic text editor
eventually.

## Installation

```shell
$ go get github.com/maxinekrebs/goin
```

## Usage

```go
package main

import (
"fmt"

"github.com/maxinekrebs/goin"
)

func main() {
fileName := "/tmp/example.txt"
input, err := goin.ReadFromFile(fileName)
if err != nil {
panic(err)
}
fmt.Println(input)
}

```