types: update comments on ctx.GetOp

This commit is contained in:
Ethan Buchman 2018-02-06 14:48:18 -05:00
parent cf91a059c9
commit 14ce7f3366
1 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ func (c Context) WithTxBytes(txBytes []byte) Context {
//---------------------------------------- //----------------------------------------
// thePast // thePast
// Returns false if ver > 0. // Returns false if ver <= 0 || ver > len(c.pst.ops).
// The first operation is version 1. // The first operation is version 1.
func (c Context) GetOp(ver int64) (Op, bool) { func (c Context) GetOp(ver int64) (Op, bool) {
return c.pst.getOp(ver) return c.pst.getOp(ver)
@ -232,7 +232,7 @@ func (pst *thePast) version() int {
return pst.ver return pst.ver
} }
// Returns false if ver > 0. // Returns false if ver <= 0 || ver > len(pst.ops).
// The first operation is version 1. // The first operation is version 1.
func (pst *thePast) getOp(ver int64) (Op, bool) { func (pst *thePast) getOp(ver int64) (Op, bool) {
pst.mtx.RLock() pst.mtx.RLock()