func (o Offset) Relative(n int64) Offset {
	o.relative = n
	return o
}
Relative returns a copy of the calling offset, changing the returned offset
to be n relative to what it currently is. If the offset is beginning at the
end, Relative(-100) will begin 100 before the end.
package kgo
import (
	"context"
	"fmt"
	"sync"
	"sync/atomic"
	"time"
	"github.com/twmb/franz-go/pkg/kerr"
	"github.com/twmb/franz-go/pkg/kmsg"
)
type Offset struct {
	at           int64
	relative     int64
	epoch        int32
	currentEpoch int32  
}
func (o Offset) MarshalJSON() ([]byte, error) {
	if o.relative == 0 {
		return []byte(fmt.Sprintf(`{"At":%d,"Epoch":%d,"CurrentEpoch":%d}`, o.at, o.epoch, o.currentEpoch)), nil
	}
	return []byte(fmt.Sprintf(`{"At":%d,"Relative":%d,"Epoch":%d,"CurrentEpoch":%d}`, o.at, o.relative, o.epoch, o.currentEpoch)), nil
}
func NewOffset() Offset {
	return Offset{
		at:    -1,
		epoch: -1,
	}
}
func (o Offset) AtStart() Offset {
	o.at = -2
	return o
}
func (o Offset) AtEnd() Offset {
	o.at = -1
	return o
}