diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2019-11-07 14:57:23 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2019-11-08 06:27:17 -0500 |
commit | 5f3a61ed422ea8e241aa819848078df1850117c8 (patch) | |
tree | a182f63566046ce80cfc9374adf370f338d399b4 /vendor/golang.org/x/text/internal/language/compact/gen_parents.go | |
parent | 3463a7194c504790e73a1750109c1813a7c3cfe9 (diff) | |
download | podman-5f3a61ed422ea8e241aa819848078df1850117c8.tar.gz podman-5f3a61ed422ea8e241aa819848078df1850117c8.tar.bz2 podman-5f3a61ed422ea8e241aa819848078df1850117c8.zip |
Add support for make vendor-in-container
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/golang.org/x/text/internal/language/compact/gen_parents.go')
-rw-r--r-- | vendor/golang.org/x/text/internal/language/compact/gen_parents.go | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/vendor/golang.org/x/text/internal/language/compact/gen_parents.go b/vendor/golang.org/x/text/internal/language/compact/gen_parents.go deleted file mode 100644 index 9543d5832..000000000 --- a/vendor/golang.org/x/text/internal/language/compact/gen_parents.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package main - -import ( - "log" - - "golang.org/x/text/internal/gen" - "golang.org/x/text/internal/language" - "golang.org/x/text/internal/language/compact" - "golang.org/x/text/unicode/cldr" -) - -func main() { - r := gen.OpenCLDRCoreZip() - defer r.Close() - - d := &cldr.Decoder{} - data, err := d.DecodeZip(r) - if err != nil { - log.Fatalf("DecodeZip: %v", err) - } - - w := gen.NewCodeWriter() - defer w.WriteGoFile("parents.go", "compact") - - // Create parents table. - type ID uint16 - parents := make([]ID, compact.NumCompactTags) - for _, loc := range data.Locales() { - tag := language.MustParse(loc) - index, ok := compact.FromTag(tag) - if !ok { - continue - } - parentIndex := compact.ID(0) // und - for p := tag.Parent(); p != language.Und; p = p.Parent() { - if x, ok := compact.FromTag(p); ok { - parentIndex = x - break - } - } - parents[index] = ID(parentIndex) - } - - w.WriteComment(` - parents maps a compact index of a tag to the compact index of the parent of - this tag.`) - w.WriteVar("parents", parents) -} |