1
1
This repository holds supplementary Go libraries for text processing, many involving Unicode.
2
2
3
+ # Semantic Versioning
4
+ This repo uses Semantic versioning (http://semver.org/ ), so
5
+ 1 . MAJOR version when you make incompatible API changes,
6
+ 1 . MINOR version when you add functionality in a backwards-compatible manner, and
7
+ 1 . PATCH version when you make backwards-compatible bug fixes.
8
+
9
+ A Unicode major and minor version bump is mapped to a major version bump in
10
+ x/text.
11
+ A path version bump in Unicode is mapped to a minor version bump in x/text.
12
+ Note that, consistent with the definitions in semver, until version 1.0.0 of
13
+ x/text is reached, the minor version is considered a major version.
14
+ So going from 0.1.0 to 0.2.0 is considered to be a major version bump.
15
+
16
+ A major new CLDR version is mapped to a minor version increase in x/text.
17
+ Any other new CLDR version is mapped to a patch version increase in x/text.
18
+
19
+ # Contribute
20
+
3
21
To submit changes to this repository, see http://golang.org/doc/contribute.html .
4
22
5
23
To generate the tables in this repository (except for the encoding tables),
@@ -8,16 +26,38 @@ Unicode version in core and the CLDR version defined in
8
26
golang.org/x/text/unicode/cldr.
9
27
10
28
Running go generate will as a side effect create a DATA subdirectory in this
11
- directory which holds all files that are used as a source for generating the
29
+ directory, which holds all files that are used as a source for generating the
12
30
tables. This directory will also serve as a cache.
13
31
32
+ ## Testing
14
33
Run
15
34
16
- go test ./...
35
+ go test ./...
17
36
18
37
from this directory to run all tests. Add the "-tags icu" flag to also run
19
38
ICU conformance tests (if available). This requires that you have the correct
20
39
ICU version installed on your system.
21
40
22
- TODO:
23
- - updating unversioned source files.
41
+ ## Versions
42
+ To update a Unicode version run
43
+
44
+ UNICODE_VERSION=x.x.x go generate
45
+
46
+ where ` x.x.x ` must correspond to a directory in http://www.unicode.org/Public/ .
47
+ If this version is newer than the version in core it will also update the
48
+ relevant packages there. The idna package in x/net will always be updated.
49
+
50
+ To update a CLDR version run
51
+
52
+ CLDR_VERSION=version go generate
53
+
54
+ where ` version ` must correspond to a directory in
55
+ http://www.unicode.org/Public/cldr/ .
56
+
57
+ Note that the code gets adapted over time to changes in the data and that
58
+ backwards compatibility is not maintained.
59
+ So updating to a different version may not work.
60
+
61
+ The files in DATA/{iana|icu|w3|whatwg} are currently not versioned.
62
+
63
+
0 commit comments