[go-nuts] Progress bar library

2020-12-26 Thread erma...@gmail.com
Hello, this my progress bar library:
https://github.com/ermanimer/progress_bar

Best regards

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/69693f85-8106-4074-b9a0-0830d4ea8330n%40googlegroups.com.


[go-nuts] Fixed channel capacity in NotifyContext function in os/signals package

2021-07-05 Thread erma...@gmail.com
Hello,

I have an improvement idea for the following line in the os/signals package.

284 
 
c.ch = make(chan os.Signal, 1)

Regarding the underlying function's (Notify) description ("the caller must 
ensure that channel has sufficient buffer space to keep up with the 
expected signal rate.") the code can be improved like the following code 
snippet:

cap := len(signals)
if cap == 0 {
cap = 1
}
c.ch = make(chan os.Signal, cap)

I wanted to discuss here first before opening my first issue :)

Best regards



-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/e97a95f0-2175-48b8-a47c-d0c99f8b8370n%40googlegroups.com.


[go-nuts] Re: Fixed channel capacity in NotifyContext function in os/signals package

2021-07-05 Thread erma...@gmail.com
Sorry about the broken link, here is the line:
https://github.com/golang/go/blob/912f0750472dd4f674b69ca1616bfaf377af1805/src/os/signal/signal.go#L284

On Monday, July 5, 2021 at 11:15:11 AM UTC+3 erma...@gmail.com wrote:

> Hello,
>
> I have an improvement idea for the following line in the os/signals 
> package.
>
> 284 c.ch = make(chan os.Signal, 1)
>
> Regarding the underlying function's (Notify) description ("the caller must 
> ensure that channel has sufficient buffer space to keep up with the 
> expected signal rate.") the code can be improved like the following code 
> snippet:
>
> cap := len(signals)
> if cap == 0 {
> cap = 1
> }
> c.ch = make(chan os.Signal, cap)
>
> I wanted to discuss here first before opening my first issue :)
>
> Best regards
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/b8b9f738-ebbd-4be1-852c-44519d432879n%40googlegroups.com.