Axel Wagner
unread,Feb 28, 2015, 3:14:21 PM2/28/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gwenn...@gmail.com, golan...@googlegroups.com, gwenn...@gmail.com, rogp...@gmail.com, dan.ko...@adelaide.edu.au
Okay, if you really can't just rewrite the code to use a
scanner-wrapper, then I can't help you, I'm afraid, never bothered
rolling my own split functions. I still believe you would fair better
with calling into bufio.SplitLines and then testing the result,
though. But I don't know exactly how that would look, so I'll shut up
now :)
>> gwenn <
gwenn...@gmail.com <javascript:>> writes:
>> > When you implement a split function,
>>
>> Why do you need to implement a split-function? It just sounds like total
>> overkill to me, to do that, if you get a *lot* cleaner and clearer code
>> without it.
>>
>> > your implementation partially works (rule a) (it skips data)
>> > until you are near the end of file where it stops prematurely (rule
>> > b).
>>
>> My Implementation doesn't use SplitFunc at all. Have you even looked at
>> it? Because I get the impression that you didn't. I wrap a
>> bufio.Scanner and just skip all returned empty lines (note, that
>> len([]byte(nil)) == 0).
>>
>> Best,
>>
>> Axel
>>
>