go-coap icon indicating copy to clipboard operation
go-coap copied to clipboard

Upgrade dependencies

Open Danielius1922 opened this issue 6 months ago • 3 comments

Direct: github.com/pion/dtls/v3 v3.0.6 golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e golang.org/x/net v0.35.0 golang.org/x/sync v0.11.0

Indirect:

github.com/pion/logging v0.2.3 golang.org/x/crypto v0.33.0 golang.org/x/sys v0.30.0

Summary by CodeRabbit

  • Chores
    • Updated linting workflow and configuration to use newer tools and modernized settings.
    • Upgraded several dependencies to newer versions for improved compatibility and stability.
  • Refactor
    • Cleaned up code by removing unused variables, simplifying struct definitions, and improving variable naming consistency in example files.
    • Adjusted function signatures and parameter usage for clarity and to avoid unused variables.
    • Improved import organization and code formatting in various example files.

Danielius1922 avatar May 08 '25 16:05 Danielius1922

Walkthrough

This update modernizes the project’s linting and dependency management. The GitHub Actions workflow for golangci-lint is upgraded to v8, and the .golangci.yml configuration is restructured to version 2 format. Several Go module dependencies are updated, and minor code cleanups are applied across example files for clarity and consistency.

Changes

File(s) Change Summary
.github/workflows/golangci-lint.yml Upgraded golangci-lint GitHub Action from v6 to v8.
.golangci.yml Restructured configuration to version 2, reorganized keys, updated exclusions, enabled formatters, and modernized settings.
go.mod Updated multiple dependencies to newer versions; added replace directives for Go 1.20 compatibility.
examples/dtls/cid/server/main.go Removed atomic import and closed field from struct; ignored unused parameter in callback.
examples/dtls/pki/cert_util.go Removed redundant nil assignment before returning error in certificate pool loading.
examples/mcast/client/main.go Replaced unused variables with _ in callbacks; minor comment formatting adjustments.
examples/mcast/server/main.go Changed error variable assignment to avoid redeclaration inside loop.
examples/options/server/main.go Consolidated import, renamed clientId to clientID for consistency.
examples/simple/server/main.go Updated function signature to ignore unused request parameter.
pkg/cache/cache.go Replaced direct embedded field method calls with receiver method calls.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub Actions
    participant golangci-lint
    Developer ->> GitHub Actions: Push code / PR
    GitHub Actions ->> golangci-lint (v8): Run lint checks with new config
    golangci-lint -->> GitHub Actions: Report results
    GitHub Actions -->> Developer: Display lint results

Possibly related PRs

  • plgd-dev/go-coap#559: Updates golangci-lint workflow and configuration, similar to this PR’s linting modernization.
  • plgd-dev/go-coap#562: Upgrades Go module dependencies, overlapping with this PR’s dependency updates.
  • plgd-dev/go-coap#580: Updates golang.org/x/exp and golang.org/x/net dependencies, directly related to this PR’s module changes.

Poem

A rabbit hops through fields of code,
Tidying imports, lightening the load.
Linters refreshed, dependencies new,
Old warnings vanish, the sky turns blue.
With every hop, the project’s bright—
Clean and modern, running right!
🐇✨

[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (1.64.8)

Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2 Failed executing command with error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2

✨ Finishing Touches
  • [ ] 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar May 08 '25 16:05 coderabbitai[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.26%. Comparing base (71407da) to head (58e5579).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #606      +/-   ##
==========================================
- Coverage   73.31%   73.26%   -0.06%     
==========================================
  Files          73       73              
  Lines        6986     6986              
==========================================
- Hits         5122     5118       -4     
- Misses       1482     1485       +3     
- Partials      382      383       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar May 08 '25 16:05 codecov-commenter