| 1 |
// Package textseg is a wrapper around each of the the Unicode-version-specific |
| 2 |
// textseg implementations that selects an implementation automatically based |
| 3 |
// on the Unicode version of the Go standard library that it's being built |
| 4 |
// against. |
| 5 |
// |
| 6 |
// The main textseg modules are designed with one major version per Unicode |
| 7 |
// major version so that different callers in the same program can potentially |
| 8 |
// use the segmentation rules from different versions of Unicode. However, in |
| 9 |
// programs that are using textseg in conjunction with other Unicode-related |
| 10 |
// functionality in the Go standard library, it could be desirable to keep the |
| 11 |
// textseg version aligned with the Go library's Unicode version so that the |
| 12 |
// total behavior is consistent with a single Unicode version. |
| 13 |
// |
| 14 |
// The API of this package is a subset of the API of the underlying |
| 15 |
// version-specific packages, intended as a drop-in replacement for callers |
| 16 |
// who are using that subset. |
| 17 |
// |
| 18 |
// In order to avoid linking in the data for all unicode versions into a |
| 19 |
// program that imports the autoversion package, this package selects a Unicode |
| 20 |
// version based on the Go compiler version that the program is being built |
| 21 |
// with. That means that this package will need to be upgraded for each new |
| 22 |
// Go version that is released, even if it doesn't introduce a new version of |
| 23 |
// Unicode. There will be a compile-time error indicating that the |
| 24 |
// ScanGraphemeClusters function is unavailable if you are using a Go version |
| 25 |
// that is not supported by your current textseg autoversion package. |
| 26 |
package textseg |