<commit_before>package rates

import "testing"

func TestFetch(t *testing.T) {
	c, _ := Country("NL")

	if r, _ := c.Rate("standard"); r != 21 {
		t.Errorf("Standard VAT rate for NL is supposed to be 21. Got %.2f", r)
	}

	if r, _ := c.Rate("reduced"); r != 6 {
		t.Errorf("Reduced VAT rate for NL is supposed to be 6. Got %.2f", r)
	}

	c, _ = Country("RO")
	if r, _ := c.Rate("standard"); r != 20 {
		t.Errorf("Standard VAT rate for RO is supposed to be 20. Got %.2f", r)
	}
}<commit_msg>Add example for `CountryRates.Rate` func.<commit_after>package rates

import (
	"fmt"
	"testing"
)

func TestCountryRates_Rate(t *testing.T) {
	c, _ := Country("NL")

	if r, _ := c.Rate("standard"); r != 21 {
		t.Errorf("Standard VAT rate for NL is supposed to be 21. Got %.2f", r)
	}

	if r, _ := c.Rate("reduced"); r != 6 {
		t.Errorf("Reduced VAT rate for NL is supposed to be 6. Got %.2f", r)
	}

	c, _ = Country("RO")
	if r, _ := c.Rate("standard"); r != 20 {
		t.Errorf("Standard VAT rate for RO is supposed to be 20. Got %.2f", r)
	}
}

func ExampleCountryRates_Rate() {
	c, _ := Country("NL")
	r, _ := c.Rate("standard")

	fmt.Printf("Standard VAT rate for %s is %.2f", c.Name, r)
	// Output: Standard VAT rate for Netherlands is 21.00
}
{'fraction_non_alphanumeric': 0.1797570850202429, 'fraction_numerical': 0.025101214574898785, 'mean_word_length': 3.2768166089965396, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1832972', 'n_tokens_mistral': 511, 'n_tokens_neox': 464, 'n_words': 158}