2025-01-11 22:14:24 +01:00
|
|
|
package profile
|
|
|
|
|
|
|
|
type Profile struct {
|
|
|
|
ProfileItems []string
|
|
|
|
Max int
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Profile) InsertOrShift(index int, value string) {
|
|
|
|
if index < len(p.ProfileItems) {
|
|
|
|
p.ProfileItems = append(p.ProfileItems[:index], value)
|
|
|
|
} else {
|
|
|
|
for len(p.ProfileItems) < index {
|
|
|
|
p.ProfileItems = append(p.ProfileItems, "0")
|
|
|
|
}
|
2025-01-21 16:43:26 +01:00
|
|
|
p.ProfileItems = append(p.ProfileItems, "0")
|
2025-01-11 22:14:24 +01:00
|
|
|
p.ProfileItems[index] = value
|
|
|
|
}
|
|
|
|
}
|