• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

cases/H25-Apr-2019-

cmd/gotext/H25-Apr-2019-

collate/H25-Apr-2019-

currency/H25-Apr-2019-

date/H25-Apr-2019-

encoding/H25-Apr-2019-

feature/plural/H25-Apr-2019-

internal/H25-Apr-2019-

language/H25-Apr-2019-

message/H25-Apr-2019-

number/H25-Apr-2019-

runes/H25-Apr-2019-

search/H25-Apr-2019-

secure/H25-Apr-2019-

transform/H25-Apr-2019-

unicode/H25-Apr-2019-

width/H25-Apr-2019-

.gitattributesH A D25-Apr-2019345

.gitignoreH A D25-Apr-2019206

AUTHORSH A D25-Apr-2019173

CONTRIBUTING.mdH A D25-Apr-2019913

CONTRIBUTORSH A D25-Apr-2019170

LICENSEH A D25-Apr-20191.4 KiB

PATENTSH A D25-Apr-20191.3 KiB

README.mdH A D25-Apr-20193.4 KiB

codereview.cfgH A D25-Apr-201921

doc.goH A D25-Apr-2019653

gen.goH A D25-Apr-20198.8 KiB

go.modH A D25-Apr-201988

go.sumH A D25-Apr-2019211

README.md

1# Go Text
2
3This repository holds supplementary Go libraries for text processing, many involving Unicode.
4
5## Semantic Versioning
6This repo uses Semantic versioning (http://semver.org/), so
71. MAJOR version when you make incompatible API changes,
81. MINOR version when you add functionality in a backwards-compatible manner,
9   and
101. PATCH version when you make backwards-compatible bug fixes.
11
12Until version 1.0.0 of x/text is reached, the minor version is considered a
13major version. So going from 0.1.0 to 0.2.0 is considered to be a major version
14bump.
15
16A major new CLDR version is mapped to a minor version increase in x/text.
17Any other new CLDR version is mapped to a patch version increase in x/text.
18
19It is important that the Unicode version used in `x/text` matches the one used
20by your Go compiler. The `x/text` repository supports multiple versions of
21Unicode and will match the version of Unicode to that of the Go compiler. At the
22moment this is supported for Go compilers from version 1.7.
23
24## Download/Install
25
26The easiest way to install is to run `go get -u golang.org/x/text`. You can
27also manually git clone the repository to `$GOPATH/src/golang.org/x/text`.
28
29## Contribute
30To submit changes to this repository, see http://golang.org/doc/contribute.html.
31
32To generate the tables in this repository (except for the encoding tables),
33run go generate from this directory. By default tables are generated for the
34Unicode version in core and the CLDR version defined in
35golang.org/x/text/unicode/cldr.
36
37Running go generate will as a side effect create a DATA subdirectory in this
38directory, which holds all files that are used as a source for generating the
39tables. This directory will also serve as a cache.
40
41## Testing
42Run
43
44    go test ./...
45
46from this directory to run all tests. Add the "-tags icu" flag to also run
47ICU conformance tests (if available). This requires that you have the correct
48ICU version installed on your system.
49
50TODO:
51- updating unversioned source files.
52
53## Generating Tables
54
55To generate the tables in this repository (except for the encoding
56tables), run `go generate` from this directory. By default tables are
57generated for the Unicode version in core and the CLDR version defined in
58golang.org/x/text/unicode/cldr.
59
60Running go generate will as a side effect create a DATA subdirectory in this
61directory which holds all files that are used as a source for generating the
62tables. This directory will also serve as a cache.
63
64## Versions
65To update a Unicode version run
66
67    UNICODE_VERSION=x.x.x go generate
68
69where `x.x.x` must correspond to a directory in https://www.unicode.org/Public/.
70If this version is newer than the version in core it will also update the
71relevant packages there. The idna package in x/net will always be updated.
72
73To update a CLDR version run
74
75    CLDR_VERSION=version go generate
76
77where `version` must correspond to a directory in
78https://www.unicode.org/Public/cldr/.
79
80Note that the code gets adapted over time to changes in the data and that
81backwards compatibility is not maintained.
82So updating to a different version may not work.
83
84The files in DATA/{iana|icu|w3|whatwg} are currently not versioned.
85
86## Report Issues / Send Patches
87
88This repository uses Gerrit for code changes. To learn how to submit changes to
89this repository, see https://golang.org/doc/contribute.html.
90
91The main issue tracker for the image repository is located at
92https://github.com/golang/go/issues. Prefix your issue with "x/text:" in the
93subject line, so it is easy to find.
94