Skip to content

feat!: modernize to v6.0.0 with context support and Go 1.26#97

Open
semoal wants to merge 1 commit into
pusher:masterfrom
semoal:master
Open

feat!: modernize to v6.0.0 with context support and Go 1.26#97
semoal wants to merge 1 commit into
pusher:masterfrom
semoal:master

Conversation

@semoal
Copy link
Copy Markdown

@semoal semoal commented Apr 7, 2026

Summary

Major modernization update bringing the library to v6.0.0 with context support and modern Go practices.

BREAKING CHANGES

  • Go 1.26+ required (previously Go 1.11+)
  • Context support: Added context.Context as first parameter to all HTTP methods:
    • Trigger, TriggerWithParams, TriggerMulti, TriggerMultiWithParams
    • TriggerBatch, SendToUser, Channels, Channel, GetChannelUsers
  • Removed deprecated methods:
    • TriggerExclusive, TriggerMultiExclusive
    • AuthenticatePrivateChannel, AuthenticatePresenceChannel
  • Removed deprecated field: EncryptionMasterKey

Improvements

  • Replace io/ioutil with io package (deprecated since Go 1.16)
  • Replace panics with error returns in crypto.go
  • Add missing error check after http.NewRequest
  • Fix typo: Paramaterparameter in error messages
  • Simplify boolean returns in util.go

Dependency Updates

  • golang.org/x/crypto → v0.49.0
  • github.com/stretchr/testify → v1.11.1

CI Updates

  • GitHub Actions updated to Go 1.25/1.26
  • Updated to latest action versions

Migration Guide

See MODERNIZATION.md for detailed migration instructions from v5.x to v6.0.0.

BREAKING CHANGES:
- Require Go 1.26+ (previously Go 1.11+)
- Add context.Context as first parameter to all HTTP methods:
  Trigger, TriggerWithParams, TriggerMulti, TriggerMultiWithParams,
  TriggerBatch, SendToUser, Channels, Channel, GetChannelUsers
- Remove deprecated methods: TriggerExclusive, TriggerMultiExclusive,
  AuthenticatePrivateChannel, AuthenticatePresenceChannel
- Remove deprecated EncryptionMasterKey field

Changes:
- Replace io/ioutil with io package (deprecated since Go 1.16)
- Replace panics with error returns in crypto.go
- Add missing error check after http.NewRequest
- Fix typo: Paramater -> parameter in error messages
- Simplify boolean returns in util.go
- Update golang.org/x/crypto to v0.49.0
- Update testify to v1.11.1 (github.com/stretchr/testify)
- Update GitHub Actions to use Go 1.25/1.26 and latest action versions
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