Skip to content

chore: apply gofmt and fix go vet copylocks warnings - #214

Merged
kiivihal merged 2 commits into
mainfrom
chore/vet-gofmt
Oct 29, 2026
Merged

kiivihal merged 2 commits into
mainfrom
chore/vet-gofmt

Conversation

@kiivihal

@kiivihal kiivihal commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Two commits:

  • style: apply gofmt: gofmt -w across 63 files. Whitespace, doc-comment headings and one //go:build line only. It also drops the no-op json tags on unexported fields in ikuzoctl/cmd/config/elasticsearch.go.
  • fix(vet): clears all 25 copylocks warnings.
    • NewPager and newFindingAid/DaoConfig.FindingAid now return pointers.
    • Fragment.IndexMessage/AddTo use pointer receivers, and res.Each now decodes into *Fragment.
    • Facet copies use proto.Clone.
    • Indexing batches are iterated by index.
    • Drops the no-op json tag on config.enableSearch.

Not touched: the "repeats json tag" warnings in hub3/ead/parser_structs.go, hub3/ead/mets.go and ikuzo/rdf/schema/recdef. encoding/json currently drops both fields of each duplicate, so fixing them would change JSON output.

🤖 Generated with Claude Code

kiivihal and others added 2 commits October 29, 2026 21:38
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Return pointers from NewPager and newFindingAid, use pointer receivers
on Fragment.IndexMessage/AddTo, clone facets with proto.Clone, and
iterate indexing batches by index. Drop json tags on unexported fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kiivihal
kiivihal merged commit 882403b into main Oct 29, 2026
6 checks passed
@kiivihal
kiivihal deleted the chore/vet-gofmt branch October 29, 2026 20:50
@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 34.24658% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.00%. Comparing base (6f8138f) to head (df4cc7c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tools/cmd/index_narthex/main.go 0.00% 17 Missing ⚠️
hub3/ead/dao.go 0.00% 5 Missing ⚠️
ikuzo/service/x/semantic/documentation.go 58.33% 5 Missing ⚠️
tools/cmd/index_narthex/process_debug.go 0.00% 5 Missing ⚠️
hub3/fragments/api.go 0.00% 4 Missing ⚠️
tools/cmd/index_narthex/essync/utils.go 0.00% 4 Missing ⚠️
hub3/fragments/fragments.go 0.00% 3 Missing ⚠️
hub3/models/indexing_batch.go 0.00% 3 Missing ⚠️
ikuzo/service/x/sparql/repo_harvest.go 0.00% 1 Missing ⚠️
tools/cmd/index_narthex/essync/submitter.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #214      +/-   ##
==========================================
- Coverage   36.01%   36.00%   -0.01%     
==========================================
  Files         412      412              
  Lines       38115    38115              
==========================================
- Hits        13726    13725       -1     
- Misses      24387    24388       +1     
  Partials        2        2              
Flag Coverage Δ
unittests 36.00% <34.24%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant