Skip to content

Should not panic in init if SupportANSI is false #4

@easeway

Description

@easeway

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")
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions