add profile holder struct

This commit is contained in:
Carlosokumu 2024-12-03 11:19:38 +03:00
parent 48e1b02e0e
commit 944fa89b3c
Signed by untrusted user: carlos
GPG Key ID: 7BD6BC8160A5C953

14
models/profile.go Normal file
View File

@ -0,0 +1,14 @@
package models
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 {
p.ProfileItems = append(p.ProfileItems, value)
}
}