seems my question is not clear.
my question is regarding naming of variables.
i know that single name variables in go is idiomatic.

r for reader
w for writer
etc...

Read(p []byte) (n int, err error)

i dont get why argument is named 'p' instead of 'b'.
there should be some reasoning.
I dont get why 'p' is chosen as argument name instead of 'b'.

thanks
Santhosh


On Sat, Apr 6, 2019 at 9:54 PM Philip Chapman <pchap...@pcsw.us> wrote:

> p is the array of bytes that you want to fill with data read.  The method
> returns the count of the number of bytes read which may be any value from
> zero to p's length.  You must make multiple reads if the thing being read
> from holds more data than your buffer array can hold.
>
> On Sat, Apr 6, 2019 at 9:16 AM Santhosh T <santhosh.tek...@gmail.com>
> wrote:
>
>> Hi,
>>
>> method in io.Reader interface is:
>>     Read(p []byte) (n int, err error)
>>
>> what does `p` stands for ?
>>
>> thanks
>> Santhosh
>>
>> --
>> 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.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Philip A. Chapman
> Java Software Development
> Enterprise, Web, and Desktop
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to