Skip to content

antonioxdias/question

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

question

Package Version Hex Docs

Simple wrapper function to grab user input in a CLI tool. It prints a prompt to stdout, waits and returns the user answer in a callback. Provides bindings for erlang and javascript.

Installation

gleam add question

Example

import question.{question}

pub fn main() {
  question("The original prompt engineering?\n", fn (answer) {
    io.println("Answer: " <> answer)
  })
}

Further documentation can be found at https://hexdocs.pm/question.

About

Prompt user with question and return answer in callback

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors