refactor: utilize standard functions max/min

Signed-off-by: komisan19 <18901496+komisan19@users.noreply.github.com>
This commit is contained in:
komisan19 2024-04-04 03:11:16 +09:00
parent 31491eb37c
commit 0249e080b4
3 changed files with 0 additions and 28 deletions

View file

@ -234,17 +234,3 @@ func (m *multipleAppender) flushAndCommit(ctx context.Context) error {
} }
return nil return nil
} }
func max(x, y int64) int64 {
if x > y {
return x
}
return y
}
func min(x, y int64) int64 {
if x < y {
return x
}
return y
}

View file

@ -198,13 +198,6 @@ func (h *Head) AppendableMinValidTime() (int64, bool) {
return h.appendableMinValidTime(), true return h.appendableMinValidTime(), true
} }
func max(a, b int64) int64 {
if a > b {
return a
}
return b
}
func (h *Head) getAppendBuffer() []record.RefSample { func (h *Head) getAppendBuffer() []record.RefSample {
b := h.appendPool.Get() b := h.appendPool.Get()
if b == nil { if b == nil {

View file

@ -327,10 +327,3 @@ func (r *LiveReader) readRecord() ([]byte, int, error) {
return rec, length + recordHeaderSize, nil return rec, length + recordHeaderSize, nil
} }
func min(i, j int) int {
if i < j {
return i
}
return j
}