diff options
| author | Paul Buetow <paul@buetow.org> | 2026-01-29 20:29:00 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-01-29 20:29:00 +0200 |
| commit | 40eb437f4826f69ce96cc30656a753519251cc4a (patch) | |
| tree | f77e7d5d74271c3211342f413b2cb8eff421749f /internal/runtimeconfig | |
| parent | c6bb463837ec8c41261604e416aeab023663ba09 (diff) | |
refactor: apply code style best practices to Anthropic implementation
- Reorganize anthropic.go: types, interface checks, constructor, public methods, private methods
- Extract helper methods from Chat() and ChatStream() to keep functions under 50 lines
- Add resolveOptions(), sendRequest(), extractContent() private methods
- Add explicit interface satisfaction check for Client and Streamer
- Add documentation comments to all public methods (Chat, Name, DefaultModel, ChatStream)
- Apply gofmt and gofumpt formatting
- Apply goimports for import ordering
All 51 tests in llm package pass
All code adheres to best practices from go-projects.md:
- Value semantics (value receivers only)
- Constructors before methods
- Public before private
- Functions under 50 lines
- Explicit interface satisfaction
- Documentation on all public identifiers
- Proper error handling
- Context as first parameter for I/O functions
Amp-Thread-ID: https://ampcode.com/threads/T-019c0af1-f215-72cf-9940-b014b1a9576b
Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'internal/runtimeconfig')
0 files changed, 0 insertions, 0 deletions
