briandowns/spinner

avoid creating a new line for spinner

medyagh opened this issue ยท 7 comments

first of all thank you for this library,
secondly we are using a fork of this lib in minikube, because if we use upstream it creates a new line for the spinner and ruins the next line

๐Ÿ˜„  minikube v1.21.0 on Darwin 11.4
โœจ  Automatically selected the docker driver. Other choices: hyperkit, parallels, virtualbox, ssh
๐Ÿ‘  Starting control plane node minikube in cluster minikube
๐Ÿšœ  Pulling base image ...
| ๐Ÿ”Ž  Verifying Kubernetes components...
    โ–ช Using image gcr.io/k8s-minikube/storage-provisioner:v5
๐ŸŒŸ  Enabled addons: storage-provisioner, default-storageclass
๐Ÿ„  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

here is the PR that the fork #108

I undrestand the PR might not be best for your project but is there any other way to fix this upstream so we could use it in minikube without a fork?

The issue with the PR was a lack of communication to any and all of the questions I had asked to help move the PR forward in some productive manner, misuse of certain lib features, and broken code. I'm not necessarily opposed to modifications. Please feel free to open a new PR that has your set of patches and we can test to make sure it doesn't break expected behavior.

I agree @briandowns the PR author @alonyb seems to be not working on it anymore. I wonder if this could have been implemented in a more integrated way by the spinner maintainers, to be fixed for everyone else as a new PR ?

I'm curious if we can use the existing functionality wiht the "prefix" or "suffix" to achieve what you want via escape codes.

@briandowns that sounds reasonable ! it should be easy to test with minikube
simply remove the replace in our go.mod

and then
make
and then
./ou/minikube start
and then expect the output look normal

I would be happy to test it if u make a PR for it, it could be an optional parameter, to toggle that

I rather we keep we use the orignal library than our other contributor's fork

Sorry, I'm not sure I'm following. What would I make a PR for?

oh sorry I didn't pay attention, you meant u already have that functionality , is there an example usage?