diff --git a/models/profile.go b/models/profile.go new file mode 100644 index 0000000..bdc1f0d --- /dev/null +++ b/models/profile.go @@ -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) + } +}