Skip to content

Commit

Permalink
fix: compiling js/wasm/plan9/aix failed missing method ColorProfile a…
Browse files Browse the repository at this point in the history
…nd EnableVirtualTerminalProcessing
  • Loading branch information
mschneider82 authored and aymanbagabas committed Jan 31, 2023
1 parent 20a0c5b commit 7d89746
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions termenv_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

package termenv

import "io"

func colorProfile() Profile {
return ANSI256
}
Expand All @@ -16,3 +18,17 @@ func (o Output) backgroundColor() Color {
// default black
return ANSIColor(0)
}

// ColorProfile returns the supported color profile:
// Default ANSI
func (o *Output) ColorProfile() Profile {
return ANSI
}

// EnableVirtualTerminalProcessing enables virtual terminal processing on
// Windows for w and returns a function that restores w to its previous state.
// On non-Windows platforms, or if w does not refer to a terminal, then it
// returns a non-nil no-op function and no error.
func EnableVirtualTerminalProcessing(w io.Writer) (func() error, error) {
return func() error { return nil }, nil
}

0 comments on commit 7d89746

Please sign in to comment.