Documentation
¶
Index ¶
- func Chunks[T any](slice []T, chunkSize int) [][]T
- func ExtractDOI(doi string) string
- func GetAnalysisPath(ctx context.Context) (string, bool)
- func GetRootDir(ctx context.Context) (string, bool)
- func InvertAbstract(abstractInvertedIndex *map[string][]int) string
- func InvertName(name string) string
- func Keep[T any](options ...*T) *T
- func KeepLongestSlice[T any](a, b []T) []T
- func KeepLongestString(a, b string) string
- func Limit[T any](slice []T, n int, compare func(a, b T) int) []T
- func SetDefaultLogger(verbose bool)
- func WithRootDir(ctx context.Context, rootDir string) context.Context
- func WrapText(text string, limit int) string
- func Zip[K any, V any](keys []K, values []V) iter.Seq2[K, V]
- type ContextKey
- type FoldedString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractDOI ¶
ExtractDOI extracts the DOI from a given DOI string, removing any prefixes.
func InvertAbstract ¶
InvertAbstract returns the string representation of an inverted abstract.
func InvertName ¶
InvertName inverts the name from "First Last" to "Last, First".
func Keep ¶
func Keep[T any](options ...*T) *T
Keep returns the first non-nil option from the given list of options.
func KeepLongestSlice ¶
func KeepLongestSlice[T any](a, b []T) []T
KeepLongestSlice returns the longest of two slices
func KeepLongestString ¶
KeepLongestString returns the longest of two strings.
func SetDefaultLogger ¶
func SetDefaultLogger(verbose bool)
Types ¶
type ContextKey ¶
type ContextKey string
type FoldedString ¶
type FoldedString string
func NewFoldedString ¶
func NewFoldedString(s *string) *FoldedString
func (FoldedString) MarshalYAML ¶
func (f FoldedString) MarshalYAML() (any, error)
Click to show internal directories.
Click to hide internal directories.