fix: missing and incorrect comments
This commit is contained in:
parent
244a18ac8c
commit
d4482994ec
|
@ -275,6 +275,10 @@ func run(context *cli.Context) (contextError error) { // nolint[funlen]
|
|||
}
|
||||
|
||||
cm := pmapi.NewClientManager(cfg.GetAPIConfig())
|
||||
|
||||
// Different build types have different roundtrippers (e.g. we want to enable
|
||||
// TLS fingerprint checks in production builds). GetRoundTripper has a different
|
||||
// implementation depending on whether build flag pmapi_prod is used or not.
|
||||
cm.SetRoundTripper(cfg.GetRoundTripper(cm, eventListener))
|
||||
|
||||
bridgeInstance := bridge.New(cfg, pref, panicHandler, eventListener, Version, cm, credentialsStore)
|
||||
|
|
|
@ -125,6 +125,7 @@ func (s *Auth) UID() string {
|
|||
return s.uid
|
||||
}
|
||||
|
||||
// GenToken generates a string token containing the session UID and refresh token.
|
||||
func (s *Auth) GenToken() string {
|
||||
if s == nil {
|
||||
return ""
|
||||
|
|
|
@ -106,6 +106,8 @@ func NewClientManager(config *ClientConfig) (cm *ClientManager) {
|
|||
return cm
|
||||
}
|
||||
|
||||
// SetClientConstructor sets the method used to construct clients.
|
||||
// By default this is `pmapi.newClient` but can be overridden with this method.
|
||||
func (cm *ClientManager) SetClientConstructor(f func(userID string) Client) {
|
||||
cm.newClient = f
|
||||
}
|
||||
|
@ -130,7 +132,7 @@ func (cm *ClientManager) GetClient(userID string) Client {
|
|||
return cm.clients[userID]
|
||||
}
|
||||
|
||||
// GetAnonymousClient returns an anonymous client. It replaces any anonymous client that was already created.
|
||||
// GetAnonymousClient returns an anonymous client.
|
||||
func (cm *ClientManager) GetAnonymousClient() Client {
|
||||
return cm.GetClient(fmt.Sprintf("anonymous-%v", cm.idGen.next()))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue