you did not quote more of the context, which was important in this
case. The relevant bits are:
sz, err := io.CopyN(s1, contents, constants.MaxBlobSize+1)
if err == nil || err == io.EOF {
bref, err = blob.RefFromHash(s1), nil
} else {
that, and the fact that err is a named returned parameter in this function.
I believe the intent here is to treat an io.EOF during the io.Copy as
a non error. So in the case of an io.EOF you want to set the function
level err to nil, so that any subsequent (naked) return will return a
nil error.
And yes, as you guessed, the effect is the same as if it had been
written as two separate lines (which is probably what i would have
done).
I believe you can set as many vars you want on the same line that way, such as:
a, b, c = foo, bar, baz
> --
> You received this message because you are subscribed to the Google Groups
> "Camlistore" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
camlistore+...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.