From b373ea2605335f6d75a20613ab45f3c1c797610a Mon Sep 17 00:00:00 2001 From: Edward Muller Date: Tue, 4 Aug 2026 11:16:57 -0700 Subject: [PATCH] Fix doc comment typos and gitignore MCP server logs Fix five doc-comment defects in seq.go: a stray closing brace in the KV usage example (which rendered broken on pkg.go.dev), an 'an the' typo in CompactFunc, 'starts of the sequence' in Drop and DropKV, and 'built in' vs 'builtin' inconsistency between Min and Max. Also ignore logs/, which the git-mcp-server writes into the working directory, so it can't be committed by accident. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Rvh5bZ6e5G62UApzeEd6gB --- .gitignore | 3 +++ seq.go | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 680ce68..2dc21b0 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ go.work.sum # env file .env .aider* + +# git-mcp-server writes its logs into the cwd +logs/ diff --git a/seq.go b/seq.go index 0ebdff8..a48f744 100644 --- a/seq.go +++ b/seq.go @@ -24,7 +24,7 @@ func With[T any](v ...T) iter.Seq[T] { // to use and then use that, like so: // // func(...) { -// type lKV = KV[string, string]} +// type lKV = KV[string, string] // i := WithKV(lKV{"a", "1"}, lKV{"b", "2"}, lKV{"c", "3"}) // ... type KV[K, V any] struct { @@ -282,7 +282,7 @@ func MaxFuncKV[K, V any](seq iter.Seq2[K, V], compare func(KV[K, V], KV[K, V]) i return mt, value } -// Min value from the sequence. Uses min built in to compare values. The second value is false if the sequence is empty. The +// Min value from the sequence. Uses min builtin to compare values. The second value is false if the sequence is empty. The // sequence is iterated over before Min returns. func Min[T cmp.Ordered](seq iter.Seq[T]) (T, bool) { var mt T @@ -367,7 +367,7 @@ func Compact[T comparable](seq iter.Seq[T]) iter.Seq[T] { } } -// CompactFunc is like [Compact] but uses an the function to compare elements. For runs of elements that compare equal, +// CompactFunc is like [Compact] but uses the function to compare elements. For runs of elements that compare equal, // CompactFunc only yields the first one. The provided sequence is iterated over lazily when the returned sequence is // iterated over. func CompactFunc[T any](seq iter.Seq[T], equal func(T, T) bool) iter.Seq[T] { @@ -812,7 +812,7 @@ func CountValues[T comparable](seq iter.Seq[T]) iter.Seq2[T, int] { } } -// Drop n elements from the starts of the sequence. The provided sequence is iterated over lazily when the returned +// Drop n elements from the start of the sequence. The provided sequence is iterated over lazily when the returned // sequence is iterated over. func Drop[T any](seq iter.Seq[T], n int) iter.Seq[T] { return func(yield func(T) bool) { @@ -829,7 +829,7 @@ func Drop[T any](seq iter.Seq[T], n int) iter.Seq[T] { } } -// DropKV n key-value pairs from the starts of the sequence. The provided sequence is iterated over lazily when the returned +// DropKV n key-value pairs from the start of the sequence. The provided sequence is iterated over lazily when the returned // sequence is iterated over. func DropKV[K, V any](seq iter.Seq2[K, V], n int) iter.Seq2[K, V] { return func(yield func(K, V) bool) {