package server

import "slices"

func (server *Server) pruneIntSlice(mySlice []int) []int {
	if len(mySlice) > 10 {
		for key := range mySlice {
			if key == 10 {
				mySlice = slices.Delete(mySlice, 9, 10)
			} else {
				mySlice[key] = mySlice[key+1]
			}
		}
	}
	return mySlice
}

func (server *Server) pruneFloat64Slice(mySlice []float64) []float64 {
	if len(mySlice) > 10 {
		for key := range mySlice {
			if key == 10 {
				mySlice = slices.Delete(mySlice, 9, 10)
			} else {
				mySlice[key] = mySlice[key+1]
			}
		}
	}
	return mySlice
}
