Socket
Socket
Sign inDemoInstall

github.com/gbin/goncurses

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/gbin/goncurses

Package goncurses is a new curses (ncurses) library for the Go programming language. It implements all the ncurses extension libraries: form, menu and panel. Minimal operation would consist of initializing the display: It is important to always call End() before your program exits. If you fail to do so, the terminal will not perform properly and will either need to be reset or restarted completely. CAUTION: Calls to ncurses functions are normally not atomic nor reentrant and therefore extreme care should be taken to ensure ncurses functions are not called concurrently. Specifically, never write data to the same window concurrently nor accept input and send output to the same window as both alter the underlying C data structures in a non safe manner. Ideally, you should structure your program to ensure all ncurses related calls happen in a single goroutine. This is probably most easily achieved via channels and Go's built-in select. Alternatively, or additionally, you can use a mutex to protect any calls in multiple goroutines from happening concurrently. Failure to do so will result in unpredictable and undefined behaviour in your program. The examples directory contains demontrations of many of the capabilities goncurses can provide.


Version published

Readme

Source

Installation

The go tool is probably the easiest way to install goncurses.

For this fork with unicode support by default: go get "github.com/gbin/goncurses"

For the vanilla original version (if you don't need unicode) : go get "code.google.com/p/goncurses"

Windows Users

Goncurses is, strictly speaking, an ncurses library. Ncurses is not available on Windows without using either a VM running an OS with ncurses or Cygwin. Instead, Goncurses uses PDCurses which is not 100% compatible with ncurses. As a result,

NOTES

No functions which operate only on stdscr have been implemented because it makes little sense to do so in a Go implementation. Stdscr is treated the same as any other window.

Whenever possible, versions of ncurses functions which could potentially have a buffer overflow, like the getstr() family of functions, have not been implemented. Instead, only the mvwgetnstr() and wgetnstr() are used.

FAQs

Last updated on 06 Nov 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc