Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container console support #229

Open
RampantDespair opened this issue Apr 21, 2024 · 1 comment
Open

Docker container console support #229

RampantDespair opened this issue Apr 21, 2024 · 1 comment

Comments

@RampantDespair
Copy link

RampantDespair commented Apr 21, 2024

Does color support coloring docker's container console?

Using something like this color.Green("Database Connected!"), colors the output on window's terminal, but not docker's.
image

Must I do something special to make color work with Docker?

Other packages like GORM are capable of doing it;
image

@RampantDespair
Copy link
Author

I just did some testing and found something strange:

Using the code from https://pkg.go.dev/github.com/fatih/color

c := color.New(color.FgCyan)
c.Println("Prints cyan text")

c.DisableColor()
c.Println("This is printed without any color")

c.EnableColor()
c.Println("This prints again cyan...")

I get the following result:
image

All the code snippets on your webpage, above the one displayed on my post, don't color docker's console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant