diff --git a/exp/internal/commands/icon.go b/exp/internal/commands/icon.go index a7a3f5dc9..adaee64d0 100644 --- a/exp/internal/commands/icon.go +++ b/exp/internal/commands/icon.go @@ -82,8 +82,8 @@ func generateExampleIcon() error { func parseSizes(sizes string) ([]int, error) { // split the input string by comma and confirm that each one is an integer parsedSizes := strings.Split(sizes, ",") - result := make([]int, len(parsedSizes)) - for i, size := range parsedSizes { + var result []int + for _, size := range parsedSizes { s, err := strconv.Atoi(size) if err != nil { return nil, err @@ -91,7 +91,7 @@ func parseSizes(sizes string) ([]int, error) { if s == 0 { continue } - result[i] = s + result = append(result, s) } // put all integers in a slice and return diff --git a/exp/pkg/menu/menu.go b/exp/pkg/menu/menu.go deleted file mode 100644 index 1e2c71cf5..000000000 --- a/exp/pkg/menu/menu.go +++ /dev/null @@ -1,22 +0,0 @@ -package menu - -type Menu struct { - Items []*Item -} - -func (m *Menu) Label(label string) *Item { - return &Item{ - Label: label, - } -} - -type CallbackContext struct { - MenuItem *Item -} - -type Item struct { - Label string - Disabled bool - Click func(*CallbackContext) - ID uint -}