github.com/go-enjin/golang-org-x-text@v0.12.1-enjin.2/README.md (about)

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