Documentation ¶
Overview ¶
Package accumulator provides an integer wrapper with a pointer receiver method to sum results of Read, ReadFrom, Write and WriteTo signatures.
Usage:
var a accumulator.Int64 defer func() { if r := recover(); r != nil { err, _ = r.(error) } n = int64(a) }() a.Accumulate(w.Write(b1)) a.Accumulate(w.Write(b2)) a.Accumulate(w.Write(b3)) a.Accumulate(w.Write(b1)) a.Accumulate64(w.ReadFrom(r)) ... fmt.Println("wrote:", a)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Int64 ¶
type Int64 int64
func (*Int64) Accumulate ¶
Accumulate Read and Write results with panic on error.
func (*Int64) Accumulate64 ¶
Accumulate64 ReadFrom and WriteTo results with panic on error.
Click to show internal directories.
Click to hide internal directories.