utility

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package utility contains functions used for formatting and to simplify development.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDate

func FormatDate(date time.Time) string

FormatDate formats a Time using the format Mon 2 Jan 2006 15:04:05.

func FormatRequests

func FormatRequests(requests []structs.Request) string

FormatRequests formats a slice of requests.

func GetMessageEntities

func GetMessageEntities(msg *tgbotapi.Message) (entities []tgbotapi.MessageEntity)

GetMessageEntities returns an array of entities. It can be message.Entities, message.CaptionEntities or an empty slice.

func GetMessageText

func GetMessageText(msg *tgbotapi.Message) (text string)

GetMessageText returns a text for the message. It can be message.Text, message.Caption or an empty string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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