> On Mon, Oct 17, 2016 at 8:29 PM, Liam Breck wrote:
>> bytes.Replace(s []byte, pos int, len uint, new []byte)
>
> I have no idea what this bizarre hypothetical function does. It's an
> awful interface that aims to solve an unknown problem nobody has
> claimed to have.
>
On Mon, Oct 17, 2016 at 8:29 PM, Liam Breck wrote:
> bytes.Replace(s []byte, pos int, len uint, new []byte)
I have no idea what this bizarre hypothetical function does. It's an
awful interface that aims to solve an unknown problem nobody has
claimed to have.
Also,
On Oct 16, 2016 6:03 PM, "Liam Breck" wrote:
>
>
>
> On Sun, Oct 16, 2016 at 5:32 PM, Ian Lance Taylor wrote:
>>
>> On Sun, Oct 16, 2016 at 5:25 PM, Liam wrote:
>> >
>> > On Sunday, October 16, 2016 at 5:13:36 PM UTC-7, Ian
On Sun, Oct 16, 2016 at 5:32 PM, Ian Lance Taylor wrote:
> On Sun, Oct 16, 2016 at 5:25 PM, Liam wrote:
> >
> > On Sunday, October 16, 2016 at 5:13:36 PM UTC-7, Ian Lance Taylor wrote:
> >>
> >> On Sun, Oct 16, 2016 at 3:34 PM, Liam
On Sun, Oct 16, 2016 at 5:25 PM, Liam wrote:
>
> On Sunday, October 16, 2016 at 5:13:36 PM UTC-7, Ian Lance Taylor wrote:
>>
>> On Sun, Oct 16, 2016 at 3:34 PM, Liam wrote:
>> >
>> > On Sunday, October 16, 2016 at 2:56:42 PM UTC-7, Ian Lance Taylor
On Sunday, October 16, 2016 at 5:13:36 PM UTC-7, Ian Lance Taylor wrote:
>
> On Sun, Oct 16, 2016 at 3:34 PM, Liam
> wrote:
> >
> > On Sunday, October 16, 2016 at 2:56:42 PM UTC-7, Ian Lance Taylor wrote:
> >
> >> To argue that this should go into the standard
On Sun, Oct 16, 2016 at 3:34 PM, Liam wrote:
>
> On Sunday, October 16, 2016 at 2:56:42 PM UTC-7, Ian Lance Taylor wrote:
>
>> To argue that this should go into the standard library, look at some
>> corpus of Go code and find out how often it occurs. If it occurs
>>
On Sunday, October 16, 2016 at 2:56:42 PM UTC-7, Ian Lance Taylor wrote:
>
>
> > A function to insert a byte into a slice is conspicuous by its absence.
>
> It's a one-liner.
> append(s[:p], append([]byte{b}, s[p:]...)...)
>
This is already gobbledygook :) Does that read "Insert" to
On Sun, Oct 16, 2016 at 1:49 PM, Liam wrote:
>
> A function to insert a byte into a slice is conspicuous by its absence.
It's a one-liner.
append(s[:p], append([]byte{b}, s[p:]...)...)
(You may want to look at https://github.com/golang/go/wiki/SliceTricks).
>
A function to insert a byte into a slice is conspicuous by its absence.
Consider this code to parse /proc/meminfo into a 2D array and insert commas:
MemTotal: 497464 kB
MemFree: 386232 kB
MemAvailable: 452420 kB
Buffers:8612 kB
Cached:
10 matches
Mail list logo