timestamp.go
func (b *TupleBuilder) PutTimestamp(field string, value time.Time) (wrote uint64, err error) {

	// field type should be
	if err = b.typeCheck(field, TimestampField); err != nil {
		return 0, err
	}

	// write value
	// length check performed by xbinary
	wrote, err = xbinary.LittleEndian.PutInt64(b.buffer, b.pos+1, value.UnixNano())
	if err != nil {
		return 0, err
	}

	// write type code
	b.buffer[b.pos] = byte(TimestampCode.OpCode)

	// set field offset
	b.offsets[field] = b.pos

	// incr pos
	b.pos += 9

	// wrote 9 bytes
	return 9, nil
}
func (b *TupleBuilder) PutTimestamp(field string, value time.Time) (wrote uint64, err error) {

	// field type should be
	if err = b.typeCheck(field, TimestampField); err != nil {
		return 0, err
	}

	// write value
	// length check performed by xbinary
	wrote, err = xbinary.LittleEndian.PutInt64(b.buffer, b.pos+1, value.UnixNano())
	if err != nil {
		return 0, err
	}

	// write type code
	b.buffer[b.pos] = byte(TimestampCode.OpCode)

	// set field offset
	b.offsets[field] = b.pos

	// incr pos
	b.pos += 9

	// wrote 9 bytes
	return 9, nil
}
// PutTimestamp writes a 64-bit signed integer (using `time.UnixNano()`) for the given `time.Time` value. The timestamp field type must be a `TimestampField`. If the buffer does not have enough space available an error is returned. Upon successful write, the number of bytes written will be returned as well as a nil error.