On Fri, Mar 27, 2020 at 10:29 PM <
ashinmi...@gmail.com> wrote:
>
> Hello Evan, where is this `set to /dev/null` operating in the source code of golang? I tried to explore it, but I didn't find it
You are replying to a message from 2012. Many things have changed since then.
Ian
> 在 2012年2月18日星期六 UTC+8下午12:16:48,Evan Shaw写道:
>>
>> fmt.Scan reads from os.Stdin, which is set to /dev/null when testing.
>> Tests should be automated and self-contained anyway, so you don't want
>> to read from stdin.
>>
>> Either use an external file, a bytes.Buffer, or a strings.Reader and
>> call scan.Fscan if you want to scan something.
>>
>> - Evan
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/fbd04f6d-4c78-4b61-a37b-3c3a10171e36%40googlegroups.com.