func getUserIconsFromDir(dir, condition string) []string { imgs, err := graphic.GetImagesInDir(dir) if err != nil { return nil } var icons []string for _, img := range imgs { if !strings.Contains(img, condition) { continue } icons = append(icons, img) } return icons }
func getUserStandardIcons() []string { imgs, err := graphic.GetImagesInDir(userIconsDir) if err != nil { return nil } var icons []string for _, img := range imgs { if strings.Contains(img, "guest") { continue } icons = append(icons, img) } return icons }