athunderx / pkg /utils /oauth2.go
Mr.L
feat: add full alist source code for Docker build
7107f0b
raw
history blame contribute delete
280 Bytes
package utils
import "golang.org/x/oauth2"
type tokenSource struct {
fn func() (*oauth2.Token, error)
}
func (t *tokenSource) Token() (*oauth2.Token, error) {
return t.fn()
}
func TokenSource(fn func() (*oauth2.Token, error)) oauth2.TokenSource {
return &tokenSource{fn}
}