Why don't you try redirecting stdout to /dev/null and see how your program
behaves.

Also, which OS are you using?

On Sun, May 8, 2022 at 11:36 PM Const V <thst...@gmail.com> wrote:

> reading 1 line '\n' delimited 100MB file
> r1 := bufio.NewReader(file)
> s := ReadWithReadLine(r1)
> InputProcessing(strings.NewReader(s), os.Stdout)
>
> in InputProcessing"
> w.Write([]byte(s)) -> waiting forever
> w.Write([]byte(s)[:100]) -> working
> ---
> func InputProcessing(r io.Reader, w io.Writer) {
> find := "error"
> /////////////////////////////////
> s := ReadWithReadLine(r)
> if strings.Contains(s, find) {
> w.Write([]byte(s)[:100])
> w.Write([]byte("\n"))
> } else {
> w.Write([]byte(" \n"))
> }
> }
> ---
> On Sunday, May 8, 2022 at 3:21:52 PM UTC-7 Amnon wrote:
>
>> On Sun, May 8, 2022 at 10:41 PM Const V <ths...@gmail.com> wrote:
>>
>>> write to stdout is not working for MB long strings
>>>
>>>>
>>>>
>> That is very surprising indeed.
>> How do you reach the conclusion?
>> How can we replicate that failure?
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/golang-nuts/IUMIxWx9aLk/unsubscribe.
> To unsubscribe from this group and all its topics, 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/b1259910-58ca-4a57-bb05-1dde2fc73443n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/b1259910-58ca-4a57-bb05-1dde2fc73443n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CALg-z3X2P%3DEKpg%2BXAK1qUYtAKGYNL4qcQ-NyN-J5Wo7Kc8DLQA%40mail.gmail.com.

Reply via email to