I'd expected I'd have to do something along those lines, wanted to double
check first to make sure I wasn't missing something. Thanks!
On Wed, Oct 19, 2016 at 9:36 AM Jakob Borg wrote:
> You could, perhaps, use ioutil.ReadAll and then typeswitch for the common
> types (strings,
You could, perhaps, use ioutil.ReadAll and then typeswitch for the common
types (strings, []byte, the numerics) that you can easily handle. If the
given receiver was not of one of those types, try to cast it to an
encoding.BinaryUnmarshaler and/or encoding.TextUnmarshaler since that's
essentially
Hi Ian! I don't think that would work, my data can be pretty much any
arbitrary data, including binary data. So I would need to tell Fscan to
ignore any spaces it sees in the data itself, and then somehow accept the
space which I replaced from EOF.
On Wed, Oct 19, 2016 at 8:38 AM Ian Davis
On Wed, Oct 19, 2016, at 03:34 PM, Brian Picciano wrote:
> Hi there! My use-case involves reading all data off of an io.Reader
> and scanning it into a receiver value provided by the user of my
> library. In many ways the same thing as fmt.Fscan. The difference is
> that only one receiver value