Documentation
¶
Index ¶
- func GetAbsolutePath(path string) (string, error)
- func GetDefaultConfigPath() (string, error)
- func IsSymlinkToDir(path string) bool
- func ReturnItem(item string) string
- type GroupItems
- type GroupsItemsSelector
- func (o *GroupsItemsSelector[I]) AddGroupItems(group string, items ...I)
- func (o *GroupsItemsSelector[I]) FindGroupsByItem(item I) (groups []string)
- func (o *GroupsItemsSelector[I]) FindGroupsByItemFirst(item I) (ret string)
- func (o *GroupsItemsSelector[I]) GetGroupAndItemByItemNumber(number int) (group string, item I, err error)
- func (o *GroupsItemsSelector[I]) HasGroup(group string) (ret bool)
- func (o *GroupsItemsSelector[I]) Print(shellCompleteList bool)
- type GroupsItemsSelectorString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAbsolutePath ¶
GetAbsolutePath resolves a given path to its absolute form, handling ~, ./, ../, UNC paths, and symlinks.
func GetDefaultConfigPath ¶ added in v1.4.256
GetDefaultConfigPath returns the default path for the configuration file if it exists, otherwise returns an empty string.
func IsSymlinkToDir ¶
Helper function to check if a symlink points to a directory
func ReturnItem ¶
Types ¶
type GroupItems ¶
func (*GroupItems[I]) ContainsItemBy ¶
func (o *GroupItems[I]) ContainsItemBy(predicate func(item I) bool) (ret bool)
func (*GroupItems[I]) Count ¶
func (o *GroupItems[I]) Count() int
type GroupsItemsSelector ¶
type GroupsItemsSelector[I any] struct { SelectionLabel string GetItemKey func(I) string GroupsItems []*GroupItems[I] }
func NewGroupsItemsSelector ¶
func NewGroupsItemsSelector[I any](selectionLabel string, getItemLabel func(I) string) *GroupsItemsSelector[I]
func (*GroupsItemsSelector[I]) AddGroupItems ¶
func (o *GroupsItemsSelector[I]) AddGroupItems(group string, items ...I)
func (*GroupsItemsSelector[I]) FindGroupsByItem ¶
func (o *GroupsItemsSelector[I]) FindGroupsByItem(item I) (groups []string)
func (*GroupsItemsSelector[I]) FindGroupsByItemFirst ¶
func (o *GroupsItemsSelector[I]) FindGroupsByItemFirst(item I) (ret string)
func (*GroupsItemsSelector[I]) GetGroupAndItemByItemNumber ¶
func (o *GroupsItemsSelector[I]) GetGroupAndItemByItemNumber(number int) (group string, item I, err error)
func (*GroupsItemsSelector[I]) HasGroup ¶
func (o *GroupsItemsSelector[I]) HasGroup(group string) (ret bool)
func (*GroupsItemsSelector[I]) Print ¶
func (o *GroupsItemsSelector[I]) Print(shellCompleteList bool)
type GroupsItemsSelectorString ¶
type GroupsItemsSelectorString struct {
*GroupsItemsSelector[string]
}
func NewGroupsItemsSelectorString ¶
func NewGroupsItemsSelectorString(selectionLabel string) *GroupsItemsSelectorString
Click to show internal directories.
Click to hide internal directories.