In Go, we use context.Context to propagate cancellations.
For instance, in the calling chain below, if the communication is cut off from the OAuth client, the call to the Authlete API via the OAuth server will be cancelled.
OAuth client => OAuth server => Authlete API
However, since there are users of the existing methods, maintaining compatibility is necessary.
To address this, I propose to add it to the interface in the following manner:
In Go, we use context.Context to propagate cancellations. For instance, in the calling chain below, if the communication is cut off from the OAuth client, the call to the Authlete API via the OAuth server will be cancelled.
OAuth client => OAuth server => Authlete API
However, since there are users of the existing methods, maintaining compatibility is necessary. To address this, I propose to add it to the interface in the following manner:
https://github.com/authlete/authlete-go/blob/master/api/authlete_api.go#L21-L25
(translation by gpt-4)