lark
                                
                                
                                
                                    lark copied to clipboard
                            
                            
                            
                        go-lark/lark v2
Why?
- No goroutine-safe context supported.
 
// old way
bot.PostMessage(msgBody)
// new way
bot.PostMessage(ctx, msgBody)
- Biz errors are not intuitive.
 
// old way
resp, err := bot.PostMessage(ctx, msgBody)
// Possible returns:
//   nil, 0 -> all go well
//   http error, resp is nil -> HTTP error
//   nil, resp.Code not equals 0 -> Biz Error
// new way
resp, err := bot.PostMessage(ctx, msgBody)
// Possible returns:
//   nil, 0 -> all go well
//   http error, resp is nil -> HTTP error
//   error that wraps resp.Code, resp.Code not equals 0 -> Biz Error
Plan
- [x] [Fundamental] HTTP wrappers with context for each request #74
 - [x] [Fundamental] Better error handling mechanism for easier debugging experience
 - [x] [Migration] Auth
 - [x] [Migration] Notification
 - [x] [Breaking] Drop Notification V1
 - [x] [Breaking] Drop Message V1
 - [x] [Migration] Message/Buzz
 - [x] [Breaking] Read Users instead of Read Info API
 - [x] [Migration] Bot
 - [x] [Migration] Chat
 - [x] [Migration] Contact
 - [x] [Breaking] Drop Event V1
 - [x] [Migration] Event
 - [x] [Breaking] Drop Group API
 - [x] [Chore] All function comments use singular form
 - [x] [Fundamental] Change Heartbeat to lazy load and Fixes #73
 - [x] [CI] Setup CI for multiple pipelines
 - [x] [Eco] Make go-lark/card a Standalone module
 - [x] [Doc] New README
 - [ ] [Eco] Gin middleware
 - [ ] [Eco] Hertz middleware
 - [ ] [Eco] Examples
 - [ ] [Extra] combine multiple in-house versions