Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Create String and Silent funcs#69

Merged
schollz merged 8 commits intoschollz:masterfrom
makew0rld:master
Apr 18, 2021
Merged

Create String and Silent funcs#69
schollz merged 8 commits intoschollz:masterfrom
makew0rld:master

Conversation

@makew0rld
Copy link
Contributor

@makew0rld makew0rld commented Jul 10, 2020

This PR adds the ProgressBar.String() method that returns the rendered version of the progress bar as a string. This is useful for environments where one doesn't want to output to stdout, but use the progess bar somewhere else. Personally I'm using it in Amfora, which is a TUI application.

This PR also adds the DefaultSilent and DefaultBytesSilent funcs, which create a ProgressBar that doesn't output anywhere, and doesn't have

OptionOnCompletion(func() {
	fmt.Fprint(os.Stderr, "\n")
})

@makew0rld
Copy link
Contributor Author

I will be fixing this PR and updating it so that it's mergeable. Tracking progress on that in this issue.

cc @MarvinJWendt

@MarvinJWendt
Copy link

Hey @makeworld-the-better-one, I am not working on this repository. I just wanted to point out, that your fork could not be merged because of the changed go.mod file.
AFAIK the only person who could merge this is @schollz :)

@makew0rld
Copy link
Contributor Author

@schollz This is now ready and can be properly merged.

@makew0rld
Copy link
Contributor Author

@schollz merge conflicts have been resolved. Can this be merged? Thanks.

@ecliptik
Copy link

@schollz ping if this could get reviewed and merged as it would help with some Debian packaging too. Thank you.

@schollz
Copy link
Owner

schollz commented Apr 18, 2021

Sure, it seems good. I guess a test would be useful (though not sure how that would be written) but I'll trust that it works!

@schollz schollz merged commit b21f862 into schollz:master Apr 18, 2021
@makew0rld
Copy link
Contributor Author

Thank you!

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

Successfully merging this pull request may close these issues.

4 participants