Update dependencies and build to go1.22 (#2113)

* Update dependencies and build to go1.22

* Fix api changes wrt to dependencies

* Update golangci config
This commit is contained in:
Wim
2024-05-23 23:44:31 +02:00
committed by GitHub
parent 56e7bd01ca
commit 2f33fe86f5
1556 changed files with 3279522 additions and 1924375 deletions

View File

@@ -57,12 +57,14 @@ type authTestResponseFull struct {
type ParamOption func(*url.Values)
type Client struct {
token string
appLevelToken string
endpoint string
debug bool
log ilogger
httpclient httpClient
token string
appLevelToken string
configToken string
configRefreshToken string
endpoint string
debug bool
log ilogger
httpclient httpClient
}
// Option defines an option for a Client
@@ -99,6 +101,16 @@ func OptionAppLevelToken(token string) func(*Client) {
return func(c *Client) { c.appLevelToken = token }
}
// OptionConfigToken sets a configuration token for the client.
func OptionConfigToken(token string) func(*Client) {
return func(c *Client) { c.configToken = token }
}
// OptionConfigRefreshToken sets a configuration refresh token for the client.
func OptionConfigRefreshToken(token string) func(*Client) {
return func(c *Client) { c.configRefreshToken = token }
}
// New builds a slack client from the provided token and options.
func New(token string, options ...Option) *Client {
s := &Client{