package
0.0.0-20230706124316-be3c365f345f
Repository: https://github.com/deleplace/programming-idioms.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
CloneStringSlice makes a defensive copy of.
Concurrent launches provided funcs, and waits for their completion.
Concurrent launches provided funcs, and returns a channel to notify completion.
ConcurrentWithAllErrors launches provided funcs, and gathers errors.
ConcurrentWithAnyErrors launches provided funcs, and returns 1 error if at least 1 error occurred, nil otherwise.
No description provided by the author
FilterOut creates a new slice from s, removing any element contained in forbidden.
FilterStrings creates a new slice from s, removing any element that doesn't match the predicate fn.
Flatten replaces newlines by spaces.
No description provided by the author
No description provided by the author
Last returns the last element of a slice, or empty string if the slice is empty.
Return alpha codes for each language (no encoding problems).
MapStrings applies f to each element of str, and returns a new slice of the same size containing all the results.
Max returns the maximum of a and b.
Min returns the minimum of a and b.
No description provided by the author
CRLF -> LF.
NormalizeRunes discard special characters from a string, for indexing and for searching.
No description provided by the author
No description provided by the author
No description provided by the author
RemoveEmptyStrings creates a new slice from s, removing all empty elements.
Sha1hash is a shorthand to get a sha1 hash as a string.
Shorten keeps only the n first bytes, add appends "..." if needed.
SplitForIndexing cuts sentences or paragrahs into words.
SplitForSearching cuts an input search string into a slice of search terms.
String2Int is a shorthand to convert a string to an int.
StringSliceContains determines whether this slice contains this string.
StringSliceContainsCaseInsensitive determines whether this slice contains this string, regardless the case.
StringSliceEquals determines whether two string slices are the same.
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Idiom is the main entity of programming-idioms.org .
IdiomHistory stores all the history: old versions of Idioms.
IdiomRenderingDecoration is the "current user" vote on this Idiom, if any.
IdiomVoteLog is a history trace of an Idiom vote, from a specific user.
Impl is a specific implementation of one Idiom in one programming language.
ImplRenderingDecoration is the "current user" vote on this Impl, if any.
ImplVoteLog is a history trace of an Impl vote, from a specific user.
LanguageSingleSelector is used to specify the prefilled value of a programming language selection widget.
No description provided by the author
PageMeta is basic metadata useful for any web page.
UserProfile is a soft (non-secure) user profile.

# Type aliases

Toggles should always be named after the positive feature they represent, and default value should be true.