Documentation ¶
Overview ¶
Package banner generates ASCII picture of the Berty logo with a message.
/\ /\ / /\ ______ Lorem ipsum dolor sit amet, consectetur / /\/ / \/ | \ adipiscing elit, sed do eiusmod tempor | | \/ | ()| | incididunt ut labore et dolore magna aliqua. \ \ | |____| Ut enim ad minim veniam, quis nostrud [...] \ \ \____/ __ __ \/ / / / ___ ____/ /___ __ / __/ / _ \/ -_) __/ __/ // / /_____/ /____/\__/_/ \__/\__ / /__/ /___/
Index ¶
Examples ¶
Constants ¶
const Banner = `` /* 313-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func OfTheDay ¶
func OfTheDay() string
OfTheDay returns the ascii-art representation of the Berty bird saying the quote of the day
Example ¶
Output:
func Say ¶
Say returns an ascii-art representation of the Berty bird saying something
Example ¶
Output: /\ /\ / /\ ______ / /\/ / \/ | \ hello world! | | \/ | ()| | \ \ | |____| \ \ \____/ __ __ \/ / / / ___ ____/ /___ __ / __/ / _ \/ -_) __/ __/ // / /_____/ /____/\__/_/ \__/\__ / /__/ /___/
Example (Long) ¶
Output: /\ /\ / /\ ______ Lorem ipsum dolor sit amet, consectetur / /\/ / \/ | \ adipiscing elit, sed do eiusmod tempor | | \/ | ()| | incididunt ut labore et dolore magna aliqua. \ \ | |____| Ut enim ad minim veniam, quis nostrud [...] \ \ \____/ __ __ \/ / / / ___ ____/ /___ __ / __/ / _ \/ -_) __/ __/ // / /_____/ /____/\__/_/ \__/\__ / /__/ /___/
Types ¶
type Quote ¶
Quote is a data type that stores the text of the quote and its author
func QOTD ¶
func QOTD() Quote
QOTD returns the quote of the day for display in banners or other graphics. This is calculated by using the number of days (24 hr periods) since a fixed time as the seed for a random number generator. This will result in the same quote being returned during a 24 hr period even after subsequent calls. UTC time is used by default if local time is not available.
BUG: The Go language cannot get local the local time on Android and iOS. This is a confirmed upstream issue, so mobile will always default to UTC.
func RandomQuote ¶
func RandomQuote() Quote
RandomQuote returns a random quote from the quote list. For the quote of the day, use the function QOTD instead.