Your message dated Mon, 09 Mar 2026 20:00:44 +0000
with message-id <[email protected]>
and subject line Bug#1128093: fixed in golang-github-bobusumisu-aho-corasick
1.0.3+dfsg-1
has caused the Debian Bug report #1128093,
regarding ITP: golang-github-bobusumisu-aho-corasick -- Aho-Corasick
string-searching algorithm in Go
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1128093: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128093
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: wnpp
Severity: wishlist
Owner: Mikhail Potemkin <[email protected]>
* Package name : golang-github-bobusumisu-aho-corasick
Version : 1.0.3-1
Upstream Author : Øyvind Ingvaldsen
* URL : https://github.com/BobuSumisu/aho-corasick
* License : MIT
Programming Lang: Go
Description : Aho-Corasick string-searching algorithm in Go
Aho-Corasick
.
Build Status (https://travis-ci.com/BobuSumisu/aho-corasick) [Image: Go
Version] (https://img.shields.io/github/go-mod/go-version/BobuSumisu/aho-
corasick) [Image: Latest Tag]
(https://img.shields.io/github/v/tag/BobuSumisu/aho-corasick)
.
Implementation of the Aho-Corasick string-search algorithm in Go.
.
Licensed under MIT License.
.
Details
.
This implementation does not use a Double-Array Trie
(https://linux.thai.net/~thep/datrie/datrie.html) as in my
implementation (https://github.com/BobuSumisu/go-ahocorasick) from a
couple of years back.
.
This reduces the build time drastically, but at the cost of higher
memory consumption.
.
The search time is still fast, and comparable to other Go
implementations I have found on github that claims to be fast (see
performance).
.
Documentation
.
Can be found at godoc.org (https://godoc.org/github.com/BobuSumisu/aho-
corasick).
.
Example Usage
.
Use a TrieBuilder to build a Trie:
.
trie := NewTrieBuilder().
AddStrings([]string{"or", "amet"}).
Build()
.
Then go and match something interesting:
.
matches := trie.MatchString("Lorem ipsum dolor sit amet, consectetur
adipiscing elit.")
fmt.Printf("Got %d matches.\n", len(matches))
.
// => Got 3 matches.
.
What did we match?
.
for _, match := range matches {
fmt.Printf("Matched pattern %d %q at position %d.\n",
match.Match(),
match.Pattern(), match.Pos())
}
.
// => Matched pattern 0 "or" at position 1.
// => Matched pattern 0 "or" at position 15.
// => Matched patterh 1 "amet" at position 22.
.
Building
.
You can easily load patterns from file:
.
builder := NewTrieBuilder()
builder.LoadPatterns("patterns.txt")
builder.LoadStrings("strings.txt")
.
Both functions expects a text file with one pattern per line.
LoadPatterns expects the pattern to be in hexadecimal form.
.
Storing
.
Use Encode to store a Trie in gzip compressed binary format:
.
f, err := os.Create("trie.gz")
err := Encode(f, trie)
.
And Decode to load it from binary format:
.
f, err := os.Open("trie.gz")
trie, err := Decode(f)
.
Performance
.
Some simple benchmarking on my machine (Intel(R) Core(TM) i7-8665U CPU @
1.90GHz, 32 GiB RAM).
.
Build and search time grows quite linearly with regards to number of
patterns and input text length.
.
Building
.
BenchmarkTrieBuild/100-4 7886 154786
ns/op
BenchmarkTrieBuild/1000-4 739 1647419
ns/op
BenchmarkTrieBuild/10000-4 91 13331713
ns/op
BenchmarkTrieBuild/100000-4 9 123886615
ns/op
.
Searching
.
BenchmarkMatchIbsen/100-4 1471089 819
ns/op
BenchmarkMatchIbsen/1000-4 202288 5667
ns/op
BenchmarkMatchIbsen/10000-4 19957 59680
ns/op
BenchmarkMatchIbsen/100000-4 2012 595086
ns/op
.
Compared to Other Implementation
.
See aho-corasick-benchmark (https://github.com/Bobusumisu/aho-corasick-
benchmark).
.
Memory Usage
.
As mentioned, the memory consumption will be quite high compared to a
double-array trie implementation. Especially during the build phase
(which currently contains a lot of object allocations).
Needed by trufflehog
--- End Message ---
--- Begin Message ---
Source: golang-github-bobusumisu-aho-corasick
Source-Version: 1.0.3+dfsg-1
Done: Simon Josefsson <[email protected]>
We believe that the bug you reported is fixed in the latest version of
golang-github-bobusumisu-aho-corasick, which is due to be installed in the
Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Simon Josefsson <[email protected]> (supplier of updated
golang-github-bobusumisu-aho-corasick package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Mon, 09 Mar 2026 16:31:13 +0100
Source: golang-github-bobusumisu-aho-corasick
Binary: golang-github-bobusumisu-aho-corasick-dev
Architecture: source all
Version: 1.0.3+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Go Packaging Team <[email protected]>
Changed-By: Simon Josefsson <[email protected]>
Description:
golang-github-bobusumisu-aho-corasick-dev - Aho-Corasick string-searching
algorithm in Go (library)
Closes: 1128093
Changes:
golang-github-bobusumisu-aho-corasick (1.0.3+dfsg-1) unstable; urgency=medium
.
* Initial release (Closes: #1128093)
Checksums-Sha1:
2d11f859bca0dfcd27e9d382fd8ea3c67009c667 3023
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg-1.dsc
28efab9dc91ea1431b09c5bdc941d0c60d2194e0 7128
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg.orig.tar.gz
7ef29d7bc51cda766169e16d0d5a6e015ff7f6d5 2384
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg-1.debian.tar.xz
2e2fbba38089a53dc253245bd3d282e6d333b6a7 7116
golang-github-bobusumisu-aho-corasick-dev_1.0.3+dfsg-1_all.deb
d33d27ed1baa532364634e7f682ce58581851d52 6504
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg-1_amd64.buildinfo
Checksums-Sha256:
0658c87f4c11fb7ba9a49ef0134e2281716ea86e9cbbd9abb09bf6a49c238eb3 3023
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg-1.dsc
e8d6442eb8968618037e2564aee1634f34412d48df320342e81cbec9e260cc7d 7128
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg.orig.tar.gz
16b17437af8213faf6697cc0147a7456459975d8ec3b466ea69fc49800718d23 2384
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg-1.debian.tar.xz
f74b3738abb94ad8132fdf5688245e7df010cf8b4c1ea9ed435bc4d0a7ad55d7 7116
golang-github-bobusumisu-aho-corasick-dev_1.0.3+dfsg-1_all.deb
ade12c836a465213780fb92f6f656d170f627251865ca63e9e86e07ef861887f 6504
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg-1_amd64.buildinfo
Files:
33b78576f19a7ec2d63fec94071af1bf 3023 golang optional
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg-1.dsc
eb2c24a362d5383c741b97a8d0345751 7128 golang optional
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg.orig.tar.gz
a117a936ba47d6dc336946eedb02beae 2384 golang optional
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg-1.debian.tar.xz
018859e4d0de5ca7a3f3884a260729a1 7116 golang optional
golang-github-bobusumisu-aho-corasick-dev_1.0.3+dfsg-1_all.deb
331265aee386cb19ce4f7917f9ad7784 6504 golang optional
golang-github-bobusumisu-aho-corasick_1.0.3+dfsg-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQNoBAEWCgMQFiEEo8ychwudMQq61M8vUXIrCP5HRaIFAmmu6CgUHHNpbW9uQGpv
c2Vmc3Nvbi5vcmfCHCYAmDMEXJLOtBYJKwYBBAHaRw8BAQdACIcrZIvhrxDBkK9f
V+QlTmXxo2naObDuGtw58YaxlOu0JVNpbW9uIEpvc2Vmc3NvbiA8c2ltb25Aam9z
ZWZzc29uLm9yZz6IlgQTFggAPgIbAwULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgBYh
BLHSvRN1vst4TPT4xNc89jjFPAa+BQJn0XQkBQkNZGbwAAoJENc89jjFPAa+BtIA
/iR73CfBurG9y8pASh3cbGOMHpDZfMAtosu6jbpO69GHAP4p7l57d+iVty2VQMsx
+3TCSA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