request.go
func (client *Client) redactError(err error) error {
	if err == nil {
		return nil
	}
	errString := err.Error()

	if len(client.apiKey) > 0 {
		errString = strings.Replace(errString, client.apiKey, "redacted", -1)
	}
	if len(client.appKey) > 0 {
		errString = strings.Replace(errString, client.appKey, "redacted", -1)
	}

	// Return original error if no replacements were made to keep the original,
	// probably more useful error type information.
	if errString == err.Error() {
		return err
	}
	return fmt.Errorf("%s", errString)
}
func (client *Client) redactError(err error) error {
	if err == nil {
		return nil
	}
	errString := err.Error()

	if len(client.apiKey) > 0 {
		errString = strings.Replace(errString, client.apiKey, "redacted", -1)
	}
	if len(client.appKey) > 0 {
		errString = strings.Replace(errString, client.appKey, "redacted", -1)
	}

	// Return original error if no replacements were made to keep the original,
	// probably more useful error type information.
	if errString == err.Error() {
		return err
	}
	return fmt.Errorf("%s", errString)
}
func ( client * Client ) redactError ( err error ) error { if err == nil { return nil } errString := err . Error ( ) if len ( client . apiKey ) > 0 { errString = strings . Replace ( errString , client . apiKey , " " , - 1 ) } if len ( client . appKey ) > 0 { errString = strings . Replace ( errString , client . appKey , " " , - 1 ) } // Return original error if no replacements were made to keep the original, // probably more useful error type information. if errString == err . Error ( ) { return err } return fmt . Errorf ( " " , errString ) }
// redactError removes api and application keys from error strings
redactError removes api and application keys from error strings