term icon indicating copy to clipboard operation
term copied to clipboard

Should not panic in init if SupportANSI is false

Open easeway opened this issue 9 years ago • 1 comments

I'm writing a program supporting both interactive/non-interactive mode (e.g. the cli is running in a pipe), the following init function crashes my program in non-interactive mode:

func init() {
    if !term.SupportANSI() {
        panic("Your terminal does not support ANSI")
    }
}

easeway avatar Mar 23 '16 20:03 easeway

NewLine can return error after the global variables are moved to Terminal, see issue #3

easeway avatar Mar 23 '16 20:03 easeway