Repository Analysis

samber/lo

💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)

0.8 Likely human-written View on GitHub
0.8
Adjusted Score
0.8
Raw Score
100%
Time Factor
2026-05-24
Last Push
21,297
Stars
Go
Language
109,728
Lines of Code
650
Files
79
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 1LOW 78

Pattern Findings

79 matches across 4 categories. Click a row to expand file-level details.

Over-Commented Block59 hits · 59 pts
SeverityFileLineSnippet
LOWtuples.go1321
LOWtuples.go1361
LOWretry_example_test.go321 throttle("bar")
LOWstring_test.go581 // @TODO: fix these tests
LOWREADME.md1841// map[string]int{"bar": 2}
LOWREADME.md4761
LOWREADME.md4801// 1
LOWmap_test.go781 assert.Equal(t, map[string]any{"key": "value"}, r1)
LOWlo_example_test.go3741 // {a 1 true}
LOWlo_example_test.go3761 for _, r := range result {
LOWlo_example_test.go3781}
LOWlo_example_test.go3801 // {b 3 true {bar} 4.2}
LOWlo_example_test.go3821 // {b 1 true {bar} 4.2 plop}
LOWlo_example_test.go3841 // {a 3 true {bar} 4.2 plop false}
LOWlo_example_test.go3861 // {a 1 true {bar} 4.2 plop false 42}
LOWlo_example_test.go3881 for _, r := range result {
LOWlo_example_test.go3921func ExampleCrossJoinBy3() {
LOWlo_example_test.go3941 // b-3-true
LOWlo_example_test.go3961 // a-4-true-{bar}
LOWlo_example_test.go3981 // a-1-true-{bar}-4.2
LOWlo_example_test.go4001 return fmt.Sprintf("%v-%v-%v-%v-%v-%v", a, b, c, d, e, f)
LOWlo_example_test.go4021 // b-4-true-{bar}-4.2-plop
LOWlo_example_test.go4041 // b-1-true-{bar}-4.2-plop-false
LOWlo_example_test.go4061 // a-2-true-{bar}-4.2-plop-false-42
LOWlo_example_test.go4081 for _, r := range result {
LOWit/find.go161
LOWit/find.go301// Returns zero value when the collection is empty.
LOWit/find.go481// If `nth` is out of bounds, it returns the zero value (empty value) for that type.
LOWit/tuples_example_test.go61 fmt.Printf("%v\n", r)
LOWit/tuples_example_test.go81 // {a 1 false}
LOWit/tuples_example_test.go101 fmt.Printf("%v\n", r)
LOWit/tuples_example_test.go121
LOWit/tuples_example_test.go141 // {b 3 false {bar} 4.2}
LOWit/tuples_example_test.go161 // {b 1 false {bar} 4.2 plop}
LOWit/tuples_example_test.go181 // {a 3 false {bar} 4.2 plop false}
LOWit/tuples_example_test.go201 // {a 1 false {bar} 4.2 plop false 42}
LOWit/tuples_example_test.go221 fmt.Printf("%v\n", r)
LOWit/tuples_example_test.go261 result := CrossJoinBy3(values("a", "b"), values(1, 2, 3, 4), values(true, false), func(a string, b int, c bool) string
LOWit/tuples_example_test.go281 // b-3-false
LOWit/tuples_example_test.go301 // a-4-false-{bar}
LOWit/tuples_example_test.go321 // a-1-false-{bar}-4.2
LOWit/tuples_example_test.go341 })
LOWit/tuples_example_test.go361 // b-4-false-{bar}-4.2-plop
LOWit/tuples_example_test.go381 // b-1-false-{bar}-4.2-plop-false
LOWit/tuples_example_test.go401 // a-2-false-{bar}-4.2-plop-false-42
LOWit/tuples_example_test.go421 fmt.Printf("%v\n", r)
LOWit/string_example_test.go21 // [12 34 56]
LOWit/seq.go81// Will allocate a map large enough to hold all distinct transformed elements.
LOWit/seq.go561// SeqToMap returns a map containing key-value pairs provided by transform function applied to elements of the given seq
LOWit/seq.go581// FilterSeqToMap returns a map containing key-value pairs provided by transform function applied to elements of the giv
LOWit/seq.go801}
LOWinternal/constraints/constraints.go1// Copyright 2021 The Go Authors. All rights reserved.
LOWinternal/xtime/noCopy.go1package xtime
LOWdocs/data/it-chunkstring.md41// seq1 yields ""
LOW.github/workflows/security.yml21 # strategy:
LOW.github/workflows/doc.yml41
LOW.github/workflows/doc.yml61 # commit_message: 'docs: sync function signatures from source'
LOWexp/simd/unsafe.go41//
LOWexp/simd/cpu_amd64_test.go21//
Fake / Example Data15 hits · 21 pts
SeverityFileLineSnippet
LOWREADME.md2459str := lo.Ellipsis(" Lorem Ipsum ", 5)
LOWREADME.md2462str := lo.Ellipsis("Lorem Ipsum", 100)
LOWREADME.md2463// Lorem Ipsum
LOWREADME.md2465str := lo.Ellipsis("Lorem Ipsum", 3)
LOWdocs/data/it-containsby.md65emails := it.Slice([]string{"user@example.com", "invalid-email", "test@domain.org"})
LOWdocs/data/core-map.md54// fullNames: []string{"John Doe", "Jane Smith"}
LOWdocs/data/core-ellipsis.md23lo.Ellipsis(" Lorem Ipsum ", 5)
LOWdocs/data/core-ellipsis.md26str = lo.Ellipsis("Lorem Ipsum", 100)
LOWdocs/data/core-ellipsis.md27// "Lorem Ipsum"
LOWdocs/data/core-ellipsis.md29str = lo.Ellipsis("Lorem Ipsum", 3)
LOWdocs/data/it-someby.md86emails := it.Slice([]string{"user@example.com", "test@gmail.com", "admin@site.net"})
LOWdocs/data/it-noneby.md86emails := it.Slice([]string{"user@example.com", "test@domain.org", "admin@site.net"})
LOWdocs/data/it-noneby.md92emails = it.Slice([]string{"user@example.com", "invalid-email", "test@domain.org"})
LOWdocs/data/it-everyby.md86emails := it.Slice([]string{"user@example.com", "test@domain.org", "admin@site.net"})
LOWdocs/data/it-everyby.md92emails = it.Slice([]string{"user@example.com", "invalid-email", "test@domain.org"})
Hyper-Verbose Identifiers4 hits · 4 pts
SeverityFileLineSnippet
LOWdocs/plugins/helpers-pages/index.ts38function readAllHelperMarkdownFiles(dataDir: string): HelperDefinition[] {
LOW…helpers-pages/components/highlightPrototypeGenerics.ts1function getGenericTypeNamesFromText(text: string): string[] {
LOW…helpers-pages/components/highlightPrototypeGenerics.ts25export function highlightPrototypeGenerics(container: HTMLElement | null): boolean {
LOW…helpers-pages/components/highlightPrototypeGenerics.ts60export function ensurePrototypeGenericsHighlighted(container: HTMLElement | null) {
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippet
MEDIUMdocs/package-lock.json18598 "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz",