// popNonce returns a nonce value previously stored with c.addNonce
// or fetches a fresh one from the given URL.
popNonce returns a nonce value previously stored with c.addNonce
or fetches a fresh one from the given URL.
// popNonce returns a nonce value previously stored with c . addNonce // or fetches a fresh one from the given URL .
func (c *Client) popNonce(ctx context.Context, url string) (string, error) {
	c.noncesMu.Lock()
	defer c.noncesMu.Unlock()
	if len(c.nonces) == 0 {
		return c.fetchNonce(ctx, url)
	}
	var nonce string
	for nonce = range c.nonces {
		delete(c.nonces, nonce)
		break
	}
	return nonce, nil
}
func ( c * Client ) popNonce ( ctx context . Context , url string ) ( string , error ) { c . noncesMu . Lock ( ) defer c . noncesMu . Unlock ( ) if len ( c . nonces ) == 0 { return c . fetchNonce ( ctx , url ) } var nonce string for nonce = range c . nonces { delete ( c . nonces , nonce ) break } return nonce , nil }
popNonce returns a nonce value previously stored with c.addNonce
or fetches a fresh one from the given URL.
popNonce returns a nonce value previously stored with c . addNonce or fetches a fresh one from the given URL .