util

package
v0.0.0-...-1596960 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnrichContent

func EnrichContent(content string, wrapAt int) (string, []string)

EnrichContent enriches links in content with numbers, returns enriched content and list of links It also wraps the text at the number of characters at wrapAt

func ExtractIDsFromLink(link string) (boardID string, threadID string, messageID string, err error)

ExtractIDsFromLink returns boardID, threadID and messageID from a given forum link. Returns err if one if the IDs cannot be extracted

func HandleMouseClickEventOnList

func HandleMouseClickEventOnList(e ui.Event, list *widgets.List) bool

HandleMouseClickEventOnList returns true if the list has been clicked and set's the active element of the list to the element clicked.

func HandleMouseClickEventOnTabBar

func HandleMouseClickEventOnTabBar(e ui.Event, bar *widgets.TabPane) bool

HandleMouseClickEventOnTabBar returns true if the TabPane has been clicked, and sets the ActiveTabIndex of the TabPane to the tab clicked

func JoinURL

func JoinURL(base string, paths ...string) string

JoinURL joins a base with url paths

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL