go-choice

A very simple library for interactively selecting an option on a terminal

APACHE-2.0 License

Stars
4

Bot releases are visible (Hide)

go-choice - v1.2.0 Latest Release

Published by TwiN over 2 years ago

  • chore: Update Go to 1.18
  • refactor: Don't export Choice struct and optimize old code
go-choice - v1.1.0

Published by TwiN almost 3 years ago

Search is now case insensitive #10 - Thanks to @ilkeraksu

go-choice - v1.0.2

Published by TwiN about 3 years ago

go-choice - v1.0.1

Published by TwiN about 3 years ago

Updated dependencies

go-choice - v1.0.0

Published by TwiN over 3 years ago

  • Added text search feature
  • Left arrow can now be used for quitting
  • Removed support for navigation with WASD and HJKL
  • Removed support for quitting with Q
go-choice - v0.1.5

Published by TwiN almost 5 years ago

  • Added support for HOME, END, PGUP and PGDN keys
  • Fixed a rendering issue
go-choice - v0.1.4

Published by TwiN almost 5 years ago

  • Added support for CTRL+C shortcut for quitting
  • Added more tests
go-choice - v0.1.3

Published by TwiN about 5 years ago

  • Return the index of the choice to prevent having to iterate over objects after selecting a choice
go-choice - v0.1.2

Published by TwiN about 5 years ago

  • Colors are now converted to tcell colors only once
  • Replaced screen.Sync() by screen.Show()
  • Each lines are now redrawn one by one instead of calling screen.Clear() on every event
go-choice - v0.1.1

Published by TwiN about 5 years ago

  • Migrated from termbox-go to tcell
  • Added tests
  • Updated to Go 1.13
go-choice - v0.1.0

Published by TwiN about 5 years ago

  • Added license to library
  • Updated termbox-go module
  • Reduced memory footprint by passing pointer instead of objects
  • Use ellipsis notation instead for custom options instead of having PickWithConfig function. As a result, PickWithConfig has been merged into Pick.
go-choice - v0.0.8

Published by TwiN about 5 years ago

  • Fixed a small bug that happened when the question above the choices contained a new line.
go-choice - v0.0.7

Published by TwiN about 5 years ago

  • Added support for higher number of options #4

Before, if there was more options than what could fit in the screen, you couldn't access them.
With this update, you can now have as much options as you desire.

go-choice - v0.0.6

Published by TwiN about 5 years ago

You can now specify text color, background color and selected text color and boldness by using PickWithConfig instead of Pick.

go-choice - v0.0.5

Published by TwiN over 5 years ago

Switched from gopkg to go.mod

go-choice - v0.0.4

Published by TwiN over 5 years ago

Remove BACKSPACE as key to cancel choice

go-choice - v0.0.3

Published by TwiN over 5 years ago

Features

  • l (vim) and d (WASD) can now be used to select an option
go-choice - v0.0.2

Published by TwiN over 5 years ago

Features

  • Added support for devices without arrow keys (#2)
    • Vim keys: j (down) and k (up)
    • Standard WASD keys: w (up) and s (down)
  • q and BACKSPACE can now be used to quit the menu
  • SPACE can now be used to pick the currently selected option
  • The Pick function now returns string, error instead of string. Rather than using panic(...) when no option is chosen or when a user wants to quit without choosing, a non-null error is returned, thus allowing developers to handle the situation however they want.
go-choice - v0.0.1

Published by TwiN over 5 years ago

First release

Package Rankings
Top 6.97% on Proxy.golang.org