github.com/aretext/aretext@v1.3.0/menu/item.go (about) 1 package menu 2 3 // Item represents an item in the editor's menu. 4 type Item struct { 5 // Name is the displayed name of the item. 6 // This is also used when searching for menu items. 7 Name string 8 9 // Aliases are a search terms for which this item will always rank first. 10 Aliases []string 11 12 // Action is the action to perform when the user selects the menu item. 13 // This should be a function that accepts a single *EditorState arg. 14 Action any 15 }