We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
If you press Ctrl+C when waiting for user input during interaction, the color of the output characters in cmd.exe is incorrect.
package main import ( "bufio" "github.com/fatih/color" "os" "strings" ) var ( Info = color.New(color.Bold, color.FgHiGreen) Error = color.New(color.Bold, color.FgHiRed) ) func main() { Info.Println("input your color: ") reader := bufio.NewReader(os.Stdin) input, _, err := reader.ReadLine() if err != nil { Error.Println(err.Error()) return } Info.Println("your input is " + strings.TrimSpace(string(input))) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If you press Ctrl+C when waiting for user input during interaction, the color of the output characters in cmd.exe is incorrect.
The text was updated successfully, but these errors were encountered: