pkg.re/essentialkaos/ek.10@v12.41.0+incompatible/terminal/terminal_windows.go (about)

     1  package terminal
     2  
     3  // ////////////////////////////////////////////////////////////////////////////////// //
     4  //                                                                                    //
     5  //                         Copyright (c) 2022 ESSENTIAL KAOS                          //
     6  //      Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>     //
     7  //                                                                                    //
     8  // ////////////////////////////////////////////////////////////////////////////////// //
     9  
    10  import (
    11  	"errors"
    12  )
    13  
    14  // ////////////////////////////////////////////////////////////////////////////////// //
    15  
    16  // ❗ ErrKillSignal is error type when user cancel input
    17  var ErrKillSignal = errors.New("")
    18  
    19  // ❗ Prompt is prompt string
    20  var Prompt = "> "
    21  
    22  // ❗ MaskSymbol is symbol used for masking passwords
    23  var MaskSymbol = "*"
    24  
    25  // ❗ MaskSymbolColorTag is fmtc color tag used for MaskSymbol output
    26  var MaskSymbolColorTag = ""
    27  
    28  // ////////////////////////////////////////////////////////////////////////////////// //
    29  
    30  // ❗ ReadUI reads user input
    31  func ReadUI(title string, nonEmpty bool) (string, error) {
    32  	panic("UNSUPPORTED")
    33  	return "", nil
    34  }
    35  
    36  // ❗ ReadAnswer reads user answer for yes/no question
    37  func ReadAnswer(title, defaultAnswer string) (bool, error) {
    38  	panic("UNSUPPORTED")
    39  	return true, nil
    40  }
    41  
    42  // ❗ ReadPassword reads password or some private input which will be hidden
    43  // after pressing Enter
    44  func ReadPassword(title string, nonEmpty bool) (string, error) {
    45  	panic("UNSUPPORTED")
    46  	return "", nil
    47  }
    48  
    49  // ❗ PrintErrorMessage prints error message
    50  func PrintErrorMessage(message string, args ...interface{}) {
    51  	panic("UNSUPPORTED")
    52  }
    53  
    54  // ❗ PrintWarnMessage prints warning message
    55  func PrintWarnMessage(message string, args ...interface{}) {
    56  	panic("UNSUPPORTED")
    57  }
    58  
    59  // ❗ PrintActionMessage prints message about action currently in progress
    60  func PrintActionMessage(message string) {
    61  	panic("UNSUPPORTED")
    62  }
    63  
    64  // ❗ PrintActionStatus prints message with action execution status
    65  func PrintActionStatus(status int) {
    66  	panic("UNSUPPORTED")
    67  }
    68  
    69  // ❗ AddHistory adds line to input history
    70  func AddHstory(ui string) {
    71  	panic("UNSUPPORTED")
    72  }
    73  
    74  // ❗ SetCompletionHandler adds function for autocompletion
    75  func SetCompletionHandler(h func(in string) []string) {
    76  	panic("UNSUPPORTED")
    77  }
    78  
    79  // ❗ SetHintHandler adds function for input hints
    80  func SetHintHandler(h func(input string) string) {
    81  	panic("UNSUPPORTED")
    82  }