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