Skip to content

go-lark/lark v2 #91

@crispgm

Description

@crispgm

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

  • [Fundamental] HTTP wrappers with context for each request Bot context is not safe for concurrent usage #74
  • [Fundamental] Better error handling mechanism for easier debugging experience
  • [Migration] Auth
  • [Migration] Notification
  • [Breaking] Drop Notification V1
  • [Breaking] Drop Message V1
  • [Migration] Message/Buzz
  • [Breaking] Read Users instead of Read Info API
  • [Migration] Bot
  • [Migration] Chat
  • [Migration] Contact
  • [Breaking] Drop Event V1
  • [Migration] Event
  • [Breaking] Drop Group API
  • [Chore] All function comments use singular form
  • [Fundamental] Change Heartbeat to lazy load and Fixes StartHeatbeat should send error if resp.Code is not 0 #73
  • [CI] Setup CI for multiple pipelines
  • [Eco] Make go-lark/card a Standalone module
  • [Doc] New README
  • [Eco] Gin middleware
  • [Eco] Hertz middleware
  • [Eco] Examples
  • [Extra] combine multiple in-house versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions