https://github.com/essentialkaos/go-linenoise
Go package wrapping the linenoise C library
https://github.com/essentialkaos/go-linenoise
golang linenoise readline
Last synced: 6 months ago
JSON representation
Go package wrapping the linenoise C library
- Host: GitHub
- URL: https://github.com/essentialkaos/go-linenoise
- Owner: essentialkaos
- License: bsd-2-clause
- Created: 2016-09-15T23:14:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-27T11:47:34.000Z (about 1 year ago)
- Last Synced: 2024-04-28T09:44:15.101Z (about 1 year ago)
- Topics: golang, linenoise, readline
- Language: C
- Homepage: https://kaos.sh/g/go-linenoise.v3
- Size: 182 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
`go-linenoise` is a Go package wrapping the [linenoise](https://github.com/antirez/linenoise) C library. Since `v3` we use [@yhirose](https://github.com/yhirose) [fork](https://github.com/yhirose/linenoise/tree/utf8-support) with UTF-8 support.
This is fork of [go.linenoise](https://github.com/GeertJohan/go.linenoise) package used in [EK](https://github.com/essentialkaos) projects.
### Example
```go
package main// ////////////////////////////////////////////////////////////////////////// //
import (
"fmt"linenoise "github.com/essentialkaos/go-linenoise/v3"
)// ////////////////////////////////////////////////////////////////////////// //
func main() {
input, err := linenoise.Line("> ")if err != nil {
fmt.Printf("Error: %v\n", err)
return
}fmt.Printf("Input: %s\n", input)
}```
### CI Status
| Branch | Status |
|--------|--------|
| `master` | [](https://kaos.sh/w/go-linenoise/ci?query=branch:master) |
| `develop` | [](https://kaos.sh/w/go-linenoise/ci?query=branch:develop) |### License
All code in this repository is licensed under a BSD license.
This project wraps [linenoise](https://github.com/antirez/linenoise) which is written by Salvatore Sanfilippo and Pieter Noordhuis. The license for linenoise is included in the files `linenoise.c` and `linenoise.h`.
For all other files please read the [LICENSE](LICENSE) file.