feat: migrate golangci-lint from v1 to v2 (#144)
Migrate golangci-lint from v1 to v2. ## Motivation and Context The golangci-lint has been upgraded to v2 since March 2025. The v2 of golangci-lint has simplified the linters management. ## How Has This Been Tested? Tested locally with golangci-lint@v2.1.6 ## Breaking Changes No. ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [ ] I have added or updated documentation as needed ## Additional context <!-- Add any other context, implementation notes, or design decisions --> --------- Co-authored-by: haokunt <haokunt@opera.com> Co-authored-by: Avinash Sridhar <sridharavinash@users.noreply.github.com> Co-authored-by: Adam Jones <adamj+git@anthropic.com>
This commit is contained in:
parent
502b628ac8
commit
6ba612942e
1 changed files with 94 additions and 101 deletions
|
|
@ -48,10 +48,7 @@ func compareSemanticVersions(version1, version2 string) int {
|
|||
parts2 := strings.Split(version2, ".")
|
||||
|
||||
// Pad with zeros if needed
|
||||
maxLen := len(parts1)
|
||||
if len(parts2) > maxLen {
|
||||
maxLen = len(parts2)
|
||||
}
|
||||
maxLen := max(len(parts2), len(parts1))
|
||||
|
||||
for len(parts1) < maxLen {
|
||||
parts1 = append(parts1, "0")
|
||||
|
|
@ -162,10 +159,7 @@ func (db *MemoryDB) List(
|
|||
})
|
||||
|
||||
// Apply pagination
|
||||
endIdx := startIdx + limit
|
||||
if endIdx > len(filteredEntries) {
|
||||
endIdx = len(filteredEntries)
|
||||
}
|
||||
endIdx := min(startIdx+limit, len(filteredEntries))
|
||||
|
||||
var result []*model.Server
|
||||
if startIdx < len(filteredEntries) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue